目录

Errors and Troubleshooting

Error Type

Among the error types, errors from the service layer can be captured by the platform and converted to the NSP_STATUS values.

Troubleshooting

Error Code

Method

0

Check whether the value of HTTP STATUS is normal.

1

Check whether the value of NSP_STATUS is normal.

2

Check whether there is any error in the return values.

HTTP STATUS

Result Code

Description

200

Success.

401

Authentication required.

500

Exception in the OpenGW.

502–504

Other network errors.

NSP STATUS

Result Code

Description

0

Success.

1

Unknown error.

2

Services are unavailable for now.

3

Unknown method.

4

The number of requests to the app has reached the maximum.

5

Requests from unauthorized IP addresses.

6

The session key of the current user has expired.

7

The number of calls exceeded the maximum.

8

API calls too frequent.

100

Unknown invalid parameter.

101

Invalid API_KEY.

102

Invalid SESSION_KEY.

103

The request must be submitted using the POST method.

104

Invalid signature.

105

System parameters such as nsp_svc, nsp_ts, and nsp_key are missing.

106

The app or session does not have the permission to call the current service.

107

The values of client_id and client_secret need to be re-obtained due to reasons such as algorithm upgrade.

108

The routing fails, and the request destination address cannot be identified.

109

The nsp_ts value difference goes beyond the allowed range.

110

Internal API exception.

403

No permission.

Error Codes

Error Code

Sub-error Code

Description

1101

12304

The client_id and client_secret fields do not match.

1101

20002

The format of client_id is incorrect. It must contain digits only.

1101

20003

The client_id parameter does not exist in the system.

1101

20012

The format of response_type is incorrect. It has a fixed value of code.

1101

20022

The format of redirect_uri is incorrect.

1101

20023

The value of redirect_uri is different from the redirection URL specified in AppGallery Connect and is not trustlisted in the app's OAuth settings.

1101

20024

The value of redirect_uri parsed from the authorization code is different from that passed as an input parameter in the request for using the authorization code to obtain an access token.

1101

20031

The format of state is incorrect.

1101

20041

The format of scope is incorrect.

1101

20042

The scope parameter does not exist in the system.

1101

20051

The format of access_type is incorrect.

1101

20071

The format of display is incorrect. (The value is page for PCs, and touch for mobile devices.)

1101

20073

Invalid code_challenge_method. Currently, only S256 and plain are supported.

1101

20074

Invalid code_challenge, which cannot be decoded by Base64.

1101

20152

The authorization code used to obtain an access token has an incorrect format.

1101

20154

The value of client_id in an authorization code, a device code, or a refresh token is different from that of the input parameter.

1101

20155

The authorization code used to obtain an access token has expired. The default validity period is 5 minutes.

1101

20156

The authorization code used to obtain an access token has been used once. It cannot be used for such a request anymore.

1101

20158

The format of code_verifier is incorrect.

1101

20159

code_verifier and code_challenge do not match.

1101

20172

The format of client_secret in the request for obtaining an access token is incorrect.

1101

20173

Invalid client_secret.

1101

20182

The value of grant_type in the request for obtaining an access token is invalid. Its value must be authorization_code, client_credentials, refresh_token, or device_code.

1101

20192

The refresh token used to obtain an access token has an incorrect format.

1101

20401

The format of user code is incorrect.

1101

20402

The user code parameter has expired or is invalid.

1101

20404

The user code parameter has expired.

1101

20406

The device code used to obtain an access token has been used once. It cannot be used for such a request anymore.

1101

20407

After an access token is obtained through a device code, the system checks the access token status at a specified interval, but only finds it is not put into use within the allowed maximum duration. Then the access token will become invalid. You need to obtain a new access token.

1101

20408

When a device code is used to obtain an access token, the value of scope parsed from the device code is invalid.

1101

20409

The value of user code has been used when a barcode is scanned for authorization. The value can be used only once.

1101

20410

The value of user code has been used to obtain an access token when a barcode is scanned for authorization. The value can be used only once.

1101

20411

The QR code has expired but is still not scanned when a device code is used to obtain an access token.

1101

20412

The user scans the QR code, the QR code has expired, but the authorization has not been performed when a device code is used to obtain an access token.

1102

20001

The client_id parameter is left empty.

1102

20011

The response_type parameter is left empty.

1102

20021

The redirect_uri parameter is left empty.

1102

20151

The authorization code or device code is left empty in the request for obtaining an access token.

1102

20171

The client_secret parameter is left empty in the request for obtaining an access token.

1102

20181

The grant_type parameter is left empty in the request for obtaining an access token.

1102

20191

The refresh_token parameter is left empty in the request for obtaining an access token.

1102

20400

The user code parameter is left empty.

1103

20153

The authorization code used to obtain an access token failed to be parsed.

1203

11205

The refresh token used to obtain an access token has expired.

1203

12303

The value of client_id in the request for using the authorization code to obtain an access token does not exist.

1203

12304

The value of client_secret in the request for using the authorization code to obtain an access token is incorrect.

1203

31202

The refresh token used to obtain an access token meets the regular expression but fails to be parsed.

1203

31204

The refresh token used to obtain an access token is blocklisted. If a user changes the password or signs out, the refresh token will be blocklisted.

1203

31218

The refresh token used to obtain an access token does not meet the regular expression.

1600

16002

The device code cannot be parsed when it is used to obtain an access token.

1600

16003

The device code has expired when it is used to obtain an access token.

1600

16001

The device code cannot be encoded. (This error is reported by the server and does not occur when the server is properly configured.)

1203

-

Other errors, such as network disconnection between internal components.