tencent cloud

DocumentationTencent OneID Identity Security

Refreshing Token

Download
Focus Mode
Font Size
Last updated: 2026-08-26 15:36:23
AI-Translated

API Description

Obtain a new access_token using a refresh_token.

Supported Application Types

Web applications, single-page applications, mobile apps, and M2M applications.

Request Method

POST

Request path

/oauth2/token

Request Content-Type

application/x-www-form-urlencoded

Request Example

POST /oauth2/token HTTP/1.1
Host: sample.portal.tencentciam.com
Content-Type: application/x-www-form-urlencoded

client_id=TENANT_CLIENT_ID&client_secret=TENANT_CLIENT_SECRET&grant_type=refresh_token&refresh_token=MOCK_REFRESH_TOKEN

Request Parameters

Parameter
No
Description
client_id
false
The application's client_id. It must match the one used when authorization is obtained.
client_secret
false
The application's client_secret. You can view it on the Application Basic Information page of the tenant management platform.
grant_type
false
Enter the fixed value refresh_token.
refresh_token
false
The refresh_token returned when a Token is obtained.

Normal Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
"access_token" : "eyJraWQiOiJkNDliYzUwNS01NTcyLTRlZDYtOWU0OC0zODhjM2Q0NGJiNDYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJNT0NLX1VTRVJOQU1FIiwiYXVkIjoiVEVOQU5UX0NMSUVOVF9JRCIsIm5iZiI6MTYzNjQ0OTIzMSwic2NvcGUiOlsib3BlbmlkIl0sImlzcyI6Imh0dHBzOlwvXC9URU5BTlQuUE9SVEFMLkRPTUFJTiIsImV4cCI6MTYzNjQ0OTUzMSwiaWF0IjoxNjM2NDQ5MjMxLCJqdGkiOiI1YTE4ZjE0MS1lMzQxLTQzMzgtODVkNi1iYjRlNDFhODY3NjUifQ.cP9azxqZW8ELTvr70T2u8S0uxq9fnEKKVh55_6umF0RzBXMtRSeN8bW1uDHzQbYVDfQZQp-vzee35XsfZkS5dYOFQmiOr_uXwd8wdgPvy_8ZHyamY4c4ytZvysx-RDrr6oeHK63lPBrkoC1n_NI6AyZtMZxtxrodggzW593FfqG6vWE7OdPBoeQ8Qk-SEntuReNb60l9f6KYs-H8DJt9f1tYbCe_4ECrxpAbezEyhjVxj_8B72oNCybs3toc1NfZ01ouhGyRIyaDqzKLFFX8QYp-UgZV3N_muUyPNXHhvF4xsiFp_Sf0gSfQ_CYQUoXVs7R_ejSPexqqqYUyXHyzJA",
"refresh_token" : "MOCK_REFRESH_TOKEN",
"scope" : "openid",
"id_token" : "eyJraWQiOiJkNDliYzUwNS01NTcyLTRlZDYtOWU0OC0zODhjM2Q0NGJiNDYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJNT0NLX1VTRVJOQU1FIiwiYXVkIjoiVEVOQU5UX0NMSUVOVF9JRCIsImF6cCI6IlRFTkFOVF9DTElFTlRfSUQiLCJpc3MiOiJodHRwczpcL1wvVEVOQU5ULlBPUlRBTC5ET01BSU4iLCJleHAiOjE2MzY0NTEwMzEsImlhdCI6MTYzNjQ0OTIzMSwianRpIjoiMDEzYmFiMzktZjkxOC00NDhmLWEzOTYtY2U3N2VlZmZkYjM3In0.M_k7_RnA3E9ptcunBhSSZkxxqqHZhH7PIMn0QQoJGhJ0nja1ZxdMwhEMBmQDZ-cDNaWNUGFT3XZkAsJNBF06g69kAu_gMzRKeGIgCUrQUO_Z1DNoec6Q6oPg3bV5JzYtNjjySEeYrlKxG0PpY3L0uRjpQFXXL6vpm9n4LXz81gsmZiC0JAfJ-n7oDH6QJ8AmfWWJZMs2qobFXsKaFqwBehXFki5qTy8MLxkHMuW-kc4IK0gadlrvic3MRsy3qgfPnwHUfCLb7Ky77EPGXGwFbNzAYGtlimCe-ZN498RatwejTXptiqkBqUhaS7QqdEcI0etAd_4J2DmJYwcXJCFwSg",
"token_type" : "Bearer",
"expires_in" : 299
}

Response Parameters

Parameter
Data Type
Description
access_token
String
The refreshed OAuth 2.0 Access Token (JWT).
refresh_token
String
The refreshed OAuth 2.0 Refresh Token.
scope
String
The Scope of the Access Token.
id_token
String
The refreshed OIDC ID Token (JWT).
token_type
String
The Token type is currently set to the fixed value Bearer.
expires_in
Number
The validity period of the Access Token, in seconds.

Exception Response Example

The refresh_token parameter is incorrect.
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8

{
"error" : "invalid_grant"
}

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback