Skip to content

获取凭证授权接口

指定银行卡签约,用户签约时携带的token请使用预签约接口获取,该接口不支持指定卡签约。

请求参数类型描述
jsonobject声明请求的JSON数据结构
scenestring使用场景
web_init_dataobject小程序/h5鉴权场景初始化数据
out_user_idstring商户刷脸用户ID
organization_idstring机构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));
返回字典类型描述
tokenstring授权凭证

参阅 官方文档

Published on the GitHub by TheNorthMemory