Skip to main content
See the Authentication API reference for the interactive playground.

Principal types

DynamoSQL recognizes two principal types: The /v1/query endpoint is intended for API clients. Portal users typically interact through the portal’s SQL editor.

Getting a token

API clients authenticate by posting their credentials to the token endpoint:
The response contains:
  • accessToken — JWT valid for one hour. Pass as Authorization: Bearer <accessToken>.
  • refreshToken — use to obtain a new access token without re-sending credentials.
  • expiresIn — token lifetime in seconds.

Scopes

Scopes control which endpoints an API client can access. They are assigned when the client is created in the portal. New API clients receive query and schemas:read by default.

Passing the bearer token

Include the token in the Authorization header on every request:

Token refresh

When your access token expires, exchange the refresh token for a new access token instead of re-authenticating with credentials:
The refresh response contains a new accessToken and expiresIn. No new refresh token is issued.

Token caching example

Tenant scoping

Every JWT carries a tenantId claim. The server reads this claim and scopes all DynamoDB access to that tenant’s tables. You cannot query another tenant’s data. The tenantId field in the request body is optional. If provided, it must match the tenantId in the JWT — a mismatch returns 403.