Skip to content
qibdo qibdo
v1
API version
  • v1
Theme
Book a demo

Refresh Access Token

POST
/iam/v1/tokens:refresh
curl --request POST \
--url https://example.com/iam/v1/tokens:refresh \
--header 'Content-Type: application/json' \
--data '{ "refresh_token": "example" }'

Exchanges a valid refresh token for a new access token and refresh token pair. The old refresh token is consumed (deleted) and cannot be reused. This RPC does not require Bearer authentication — the refresh token itself is the credential.

Media type application/json

RefreshTokenRequest

Request message for RefreshToken. Carries the refresh token to exchange for a new access + refresh token pair.

object
refresh_token
required

The refresh token value (prefixed with qbr_)

string
Example generated
{
"refresh_token": "example"
}

OK

Media type application/json

RefreshTokenResponse

Response message for RefreshToken. Carries a freshly issued access + refresh token pair and their expiry timestamps.

object
access_token

The new opaque access token

string
access_token_expires_at

The expiration time of the new access token

string format: date-time Output only
refresh_token

The new opaque refresh token (replaces the consumed one)

string
refresh_token_expires_at

The expiration time of the new refresh token

string format: date-time Output only
access_token_hash

SHA-512 hex fingerprint of the new access token. CLI/TUI clients use this as the stable session identifier — it matches the row’s iam.tokens.token_hash for the just-rotated access token, so clients never need to compute SHA-512 themselves.

stringOutput only
Example generated
{
"access_token": "example",
"refresh_token": "example"
}

Default error response

Media type application/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}