Updated on 2025-11-13 GMT+08:00

Interface for Refreshing a Token

Scenario

This interface is used to refresh token values.

Method

Post

URI

https://Domain name/rest/isales/v1/openapi/obs/auth/refresh. An example of the domain name is service.besclouds.com.

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

Enter application/json or charset=UTF-8.

2

Authentication

Authentication

Yes

Token character string.

Table 2 Request body parameter

No.

Parameter

Mandatory or Not

Value Type

Description

1

refreshToken

Yes

String

Refreshes the token.

Response Description

  • Response status code: 200
    Table 3 Response body parameters

    No.

    Parameter

    Value Type

    Description

    1

    result

    String

    Error code. The options are as follows:

    0: success

    Other values: failure

    2

    resultData

    Object

    Object in the returned result after a successful query.

    Table 4 resultData object

    No.

    Parameter

    Value Type

    Description

    1

    token

    String

    Authentication token.

    2

    tokenExpirationTime

    String

    Validity period of the authentication token.

    3

    refreshToken

    String

    Refreshes the token.

    4

    refreshExpirationTime

    String

    Refreshes the token validity period.

Error Codes

  • Response status code: 400

    Incorrect request. Check the request path and parameters.

  • Response status code: 401

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

  • Response status code: 403

    Authentication failed.

  • Response status code: 404

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

  • Response status code: 500

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

Example

  • Request header:
Content-Type:application/json
Authentication:Bearer e3fca9398eaa5cef4b57b523b9c75fae
  • Request message:
{
"refreshToken":"dfjiaodjfaf"
}

  • Response message:
    {
    "result":0,   // 0: success; other values: failure
        "resultData": {
            "token":"fajiofjqwioeha",
            "tokenExpirationTime":300,// Unit: second
            "refreshToken":"fajiofjqwioeha",
            "refreshExpirationTime":3600,// Unit: second
    }
    }