SynqDocs
Management APIIdentities

Read a user's access token at a provider

The person's access token at the provider of one of their linked accounts, for your server to call that provider's API as them, where the brand keeps tokens there (`keep_tokens`, through its own app). Synq refreshes it first when it expires within a minute and a refresh token is kept; the refresh token is never returned. Only an org API key, from a server: a person's access token, the dashboard's included, or a request with an `Origin` or `Sec-Fetch-Site` header (a browser's) is 403 `server_only`. Each read is recorded as `user.provider_token_read`; a refresh the provider refuses deletes the tokens, records `user.identity_token_revoked` and answers 409 `provider_token_revoked`. Limited per org. Needs `org.users.providerTokens.read`.

POST/v1/orgs/{org}/brands/{brand}/users/{user}/identities/{identity}/access-token

The person's access token at the provider of one of their linked accounts, for your server to call that provider's API as them, where the brand keeps tokens there (keep_tokens, through its own app). Synq refreshes it first when it expires within a minute and a refresh token is kept; the refresh token is never returned. Only an org API key, from a server: a person's access token, the dashboard's included, or a request with an Origin or Sec-Fetch-Site header (a browser's) is 403 server_only. Each read is recorded as user.provider_token_read; a refresh the provider refuses deletes the tokens, records user.identity_token_revoked and answers 409 provider_token_revoked. Limited per org. Needs org.users.providerTokens.read.

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string

The org's id

Match^org_[0-9a-hjkmnp-tv-z]{26}$
brand*string

The brand's id

Match^brd_[0-9a-hjkmnp-tv-z]{26}$
user*string

The user's id

Match^usr_[0-9a-hjkmnp-tv-z]{26}$
identity*string

The identity's id

Match^idn_[0-9a-hjkmnp-tv-z]{26}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/brands/brd_01h455vb4pex5vsknk084sn02q/users/usr_01h455vb4pex5vsknk084sn02q/identities/idn_01h455vb4pex5vsknk084sn02q/access-token" \  -H "Authorization: Bearer $SYNQ_API_KEY" \  -H "Content-Type: application/json" \  -d '{}'
{  "access_token": "string",  "scope": "string",  "expires_at": "2026-10-21T12:00:00.000Z"}