目录

Real-Name Authorization Result Query

Function

Obtains the real-name authorization result of a user.

Scenario

You can call this API to obtain the authorization result and real-name of a user after user authorization.

Prototype

Request Parameters

Request Header

Parameter Mandatory Type Description
Content-Type Yes String The value is application/json; charset=UTF-8.
PayDevAuth Yes String The value is a JSON string of PayDevAuth.

Request Body

Parameter Mandatory Type Description
realNameAuthId Yes String Real-name authorization ID, which is the authorization ID returned by the app API after user authorization for real-name information. The value contains 1 to 10 characters.
openId Yes String OpenID of a user. For details, see Obtaining User Information. The value contains 1 to 512 characters.

Request Example

POST /api/v1/realname/auth/result HTTP/1.1
Content-Type: application/json;charset=UTF-8
PayDevAuth: {"clientId":"10132120***","accessToken":"DQEBALZh0tlSKKiNDJ9lYYg0Du0EB3E6PvcGlFsyB*******************XR+k2EX8ry1IGdDUZG1PjfcWQ94xnK7w3ag==","traceId":"202305151026422776499","time":1684117602555, "developerSignKeyId":"76e5ee072756417a829201fa********************f9a292d23ca949202c3dac548120", "petalpaySignKeyId":"DEVELOPER_SIGN_EB48251AC36***", "headerSign":"u+H3F14Oe3fS34d32S9mGCES89XA7tSjp8+********************lOGS7eADFfw2E45WJu52vY5Ku4KGcSCnSeE6DiKs=", "bodySign":"y3DFDtDLXDBqDoItDgHmFJ343H57LKH6U5G7F/*******************asPj10iDUIFeHaszDFHpiHRT23LGHaxvHJKta6J5UxIUmApL+wGdV/juGEvQ="}
Accept: application/json
{
  "realNameAuthId": "453423423***",
  "openId": "88e9eae22447d7a138357cbf0af2d9a3a84819ec18419631c*******************2b9cc4e33ad29e2048318b47ec98be41cecdd4e153e6216a6bd60851"
}

Response Parameters

Response Header

Parameter Mandatory Type Description
Content-Type Yes String The value is application/json; charset=UTF-8.

Response Body

Parameter Mandatory Type Description
resultCode Yes String Result code. 000000 indicates success, and other values indicate exceptions. For details, see Result Codes.
resultDesc Yes String Result description.
subCode No String Service result code.
subDesc No String Service result description.
sign Yes String Signature, which is used to perform anti-tamper verification on response packets.
credentialType Yes String

Certificate type.

01: ID card

credentialIdNo Yes String Certificate number encrypted using SHA-512. The value contains a maximum of 128 characters.
realName Yes String User name encrypted using SHA-512. The value contains a maximum of 128 characters.

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "resultCode": "000000",
  "resultDesc": "Success.",
  "sign": "MEQCIEIWzdpziRyTi8vhwWHFu********************0YAMabeCgTDG77e+2XJItvq/ZkIcCN5/B20pQ==",
  "credentialType": "01",
  "credentialIdNo": "a27aad63294be3fbb164e3d3d4634956cc6dc7427860*******************87798851b9fcd0f828ba78cfd99bf3d64bfa83815659e989f50d537",
  "realName": "a24374f8658456db7a20cb73001f28f886c31232097bda8*******************ecbb12eb7db7edb57c507ebefdea4ab66f8f2f6acc835355fbef7299c5c48806a"
}

Error Codes

For error codes of resultCode other than 400000, see Common Result Codes.

Return Code Result Code Description Solution
400000 UNKNOW_ERROR Service temporarily unavailable. Try again later. Try again later.
400000 INVALID_ARGUMENTS Invalid parameter. Check the request parameters.
400000 CLIENT_ID_PARAM_ERROR Client ID error. Check whether the clientId parameter in the request header is correct.
400000 INVALID_OPENID OpenID error. Check whether the input parameter openId in the request is correct.
400000 REAL_NAME_UNAUTHORIZED Real-name information unauthorized. Check whether the realNameAuthId parameter is correct. Check whether the input parameter realNameAuthId in the request is correct.