Antom, leading provider of tailored payment solutionsAntom, leading provider of tailored payment solutions

alipay.intl.oauth.auth.queryByAuthInfo

This interface can be used to query the token status with authMerchantId and merchantAgreementId. You can call this interface before initiating a signing process or before canceling the automatic deduction request.

Request Parameters

No

Name

Description

Type

Length

Required

Remarks

Sample

1

version

API version

string

8

Y

As per the respective API reference

2.0.0

2

function

API interface

string

128

Y

According to specifications defined by each business domain

alipay.intl.function

3

clientId

Client ID

string

32

Y

Provided by AlipayHK, used to identify partner and application system

4Q5XPV504B0A5302

4

reqTime

Request time

datetime

/

Y

DateTime with timezone, which follows the ISO-8601 standard.
Refer to: 
RFC 3339 Section 5.6

2001-07-04T12:08:56+05:30

5

reqMsgId

Request message ID

string

64

Y

Each request will be assigned with a unique id (uuid).
The reqMsgId identify an unique system request, it is not used to identity an unique business request.

1234567asdfasdf1123fda

6

reserve

Reserved for future implementation

string

256

N

Key/Value

{}

Body

No

Name

Description

Type

Length

Required

Remarks

Sample

1

authMerchantId

Auth merchant ID. The auth merchant can be authorized by the user to access user resources.

String

64

Y

2160400000002012

2

merchantAgreementId

The external agreement ID from the merchant

String

32

Y

a3419524e24941a6ba0a9c659f78752c

Request Sample

{
    "request":{
        "head":{
            "version":"2.0.0",
            "function":"alipay.intl.oauth.auth.queryByAuthInfo",
            "clientId":"4Q5XPV504B0A5302",
            "reqTime":"2001-07-04T12:08:56+05:30",
            "reqMsgId":"1234567asdfasdf1123fdh",
            "reserve":"{}"
        },
        "body":{
            "authMerchantId":"2160400000002012",
            "merchantAgreementId":"a3419524e24941a6ba0a9c659f78752c"
        }
    },
    "signature":"XXX"
}

Response parameters

Header

No

Name

Description

Type

Length

Required

Remarks

Sample

1

version

API version

string

8

Y

As per the respective API reference

2.0.0

2

function

API interface

string

128

Y

According to specifications defined by each business domain

alipay.intl.function

3

clientId

Client ID

string

32

Y

Provided by Alipay, used to identify partner and application system

4Q5XPV504B0A5302

4

respTime

Response time

datetime

/

Y

DateTime with timezone, which follows the ISO-8601 standard.  
Refer to: RFC 3339 Section 5.6

2001-07-04T12:08:56+05:30

5

reqMsgId

Request message ID

string

64

Y

Each request will be assigned with a unique id (uuid).

1234567asdfasdf1123fda

6

reserve

Reserved for future implementation

string

256

N

Key/Value

{}

Body 

No

Name

Description

Type

Length

Required

Remarks

Sample

1

resultInfo

Result info

ResultInfo

/

Y

"resultInfo": {
                "resultCode": "SUCCESS",
                "resultCodeId": "00000000",
                "resultMsg": "Success",
                "resultStatus": "S"
            }

2

accessTokenInfo

The detailed accessToken information.

Note:

This parameter is requiredwhen

resultInfo.resultCode = SUCCESS

AccessTokenInfo

/

N

"accessTokenInfo": {
                "accessToken": "nnQ9B9GGoOB0ytpLdvlOqr7pLEWrnptVpmQXPRwj77000969",
                "expiresIn": "2038-01-01T00:00:36-08:00",
                "reExpiresIn": "2038-01-01T00:00:36-08:00",
                "refreshToken": "dIQfFcubLFSuY3ueZqsyI6VPrqB57Xx9nBNiPj9B07001969",
                "tokenStatus": "ACTIVE"
            }

Response Sample

{
    "response": {
        "body": {
            "accessTokenInfo": {
                "accessToken": "nnQ9B9GGoOB0ytpLdvlOqr7pLEWrnptVpmQXPRwj77000969",
                "expiresIn": "2038-01-01T00:00:36-08:00",
                "reExpiresIn": "2038-01-01T00:00:36-08:00",
                "refreshToken": "dIQfFcubLFSuY3ueZqsyI6VPrqB57Xx9nBNiPj9B07001969",
                "tokenStatus": "ACTIVE"
            },
            "resultInfo": {
                "resultCode": "SUCCESS",
                "resultCodeId": "00000000",
                "resultMsg": "Success",
                "resultStatus": "S"
            }
        },
        "head": {
            "clientId": "4Q5XPV504B0A5302",
            "function": "alipay.intl.oauth.auth.queryByAuthInfo",
            "reqMsgId": "1234567asdfasdf1123fdh",
            "respTime": "2018-12-10T22:23:11-08:00",
            "version": "2.0.0"
        }
    }
}

Business Error code

Functional Logic Result Code

No

ResultCodeId

ResultCode

ResultStatus

Remarks

1

00000004

PARAM_ILLEGAL

F

Illegal parameters

2

12014173

ACCESS_TOKEN_NOT_EXIST

F

Access token not exist

3

12005010

AGREEMENT_NOT_EXIST

F

The agreement does not exist