Updated on 2023-09-27 GMT+08:00

Verifying Token Information

Scenario

This interface is invoked to verify token information. It is used in the scenario where the mobile app interconnects with the AppCube. After obtaining a token from the mobile app, the AppCube invokes this interface to parse the token to obtain user information and open the AppCube page.

Method

POST

URI

https://Domain name/apiaccess/rest/service-pub/authentication (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

requestBody

Object

Yes

-

1.1

token

String

Yes

Token information

Response Description

  • Status code: 200
    Table 2 Response body parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1

    schema

    Object

    Yes

    Returned message

    1.1

    returnCode

    String

    Yes

    Return code

    0: success

    1: empty token

    2: invalid token

    3: expired token

    4: system error

    1.2

    returnMsg

    String

    No

    Description

    1.3

    data

    Object

    No

    User information

    1.3.1

    userAccount

    String

    No

    User account

    1.3.2

    userId

    String

    No

    Unique user ID

    1.3.3

    tenantId

    String

    No

    Unique tenant ID

    1.3.4

    tenantSpaceId

    String

    No

    Tenant space ID

    1.3.5

    locale

    String

    No

    Language information

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 403

    Authentication fails.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

Request header: none

Request parameters:

{"token":"*********************"}

Response parameters:

{
  "returnCode":"0",
  "returnMsg":"success",
  "data":{
     "userAccount":"xx",
         "userId":"xx",
         "tenantId":"xx",
         "tenantSpaceId":"xx",
         "locale":"en_US",
  }
}