获取凭证授权接口
指定银行卡签约,用户签约时携带的token请使用预签约接口获取,该接口不支持指定卡签约。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
scene | string | 使用场景 |
web_init_data | object | 小程序/h5鉴权场景初始化数据 |
out_user_id | string | 商户刷脸用户ID |
organization_id | string | 机构ID |
php
$instance->v3->offlinefacemch->tokens->postAsync([
'json' => [
'scene' => 'WEBSESSION',
'web_init_data' => [
'out_user_id' => '',
'organization_id' => '',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/offlinefacemch/tokens')->postAsync([
'json' => [
'scene' => 'WEBSESSION',
'web_init_data' => [
'out_user_id' => '',
'organization_id' => '',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/offlinefacemch/tokens']->postAsync([
'json' => [
'scene' => 'WEBSESSION',
'web_init_data' => [
'out_user_id' => '',
'organization_id' => '',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->offlinefacemch->tokens->post([
'json' => [
'scene' => 'WEBSESSION',
'web_init_data' => [
'out_user_id' => '',
'organization_id' => '',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/offlinefacemch/tokens')->post([
'json' => [
'scene' => 'WEBSESSION',
'web_init_data' => [
'out_user_id' => '',
'organization_id' => '',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/offlinefacemch/tokens']->post([
'json' => [
'scene' => 'WEBSESSION',
'web_init_data' => [
'out_user_id' => '',
'organization_id' => '',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
token | string | 授权凭证 |
参阅 官方文档