Update the access token for a social identity by verification ID

PUT /api/my-account/identities/{target}/access-token

This API updates the token storage for a social identity by a given social verification ID. It is used to fetch a new access token from the social provider and store it securely in Logto.

Path parameters

  • target string Required

    Minimum length is 1.

application/json

Body Required

  • verificationRecordId string Required

    Minimum length is 1.

Responses

  • 200 application/json

    The token storage was updated successfully. The new access token is returned in the response body.

    Hide response attributes Show response attributes object
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    The verification record is invalid; the social identity does not exist; or the access token is not available.

PUT /api/my-account/identities/{target}/access-token
curl \
 --request PUT 'https://[tenant_id].logto.app/api/my-account/identities/{target}/access-token' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"verificationRecordId":"string"}'
Request examples
{
  "verificationRecordId": "string"
}
Response examples (200)
{
  "access_token": "string",
  "scope": "string",
  "token_type": "string",
  "expires_in": 42.0
}