Skip to content

Enumerate Tokens

← HTTP API reference
View source specification ↗
GET /tokens

Lists tokens owned by the authenticated principal. A principal may only list tokens they own.

Requires a signed user/session or the existing authenticated client flow. The anonymous DCR delegated device profile cannot invoke this operation.

Required scope

Any authenticated access token

Query parameters

nextTokenstring

Opaque token for the next page of results. Pass the continuation token returned by the previous response, unchanged. Omit it to start from the first page.

maxResultsinteger

Maximum number of results to return

minimum: 1

maximum: 100

expandarray<string>

Expansion tokens that request related or computed fields for each result. When omitted, the response contains only the default, shallower set of fields for each result.

Returns

200

Tokens retrieved successfully

Fields

resultsarray<TokenListItem>Required
paginationContextPaginationContext
errorsarray<Error>

Partial query errors collected while returning available results.

Errors

400 BAD_REQUEST

Bad request

Check the request fields and any validation details, then correct the payload.

401 UNAUTHORIZED

Unauthorized

Obtain a valid access token, then retry.

403 INSUFFICIENT_PERMISSIONS

Forbidden - not allowed to list tokens

Check the linked account and its permissions for the device or resource.

500 INTERNAL

Internal server error

Retry with backoff only when the operation is safe to repeat. Include the error code when reporting persistent failures.