Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop’s web and mobile embedded components.
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Parameters for CreateAccessToken
The unique identifier of the company to generate the token for, starting with 'biz_'. The API key must have permission to access this company.
"biz_xxxxxxxxxxxxxx"
The expiration timestamp for the access token. Defaults to 1 hour from now, with a maximum of 3 hours.
"2023-12-01T05:00:00.401Z"
An array of permission scopes to grant to the access token. If empty or omitted, all permissions from the authenticating credential are inherited. Must be a subset of the credential's permissions.
Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.
The unique identifier of the user to generate the token for, starting with 'user_'. The API key must have permission to access this user.
"user_xxxxxxxxxxxxx"
A successful response
A short-lived access token used to authenticate API requests on behalf of a user.