Access Tokens
Last updated
Was this helpful?
Last updated
Was this helpful?
GET /api/v1/users/:user_id/tokens/:id
Scope: url:GET|/api/v1/users/:user_id/tokens/:id
The ID can be the actual database ID of the token, or the ‘token_hint’ value.
POST /api/v1/users/:user_id/tokens
Scope: url:POST|/api/v1/users/:user_id/tokens
Create a new access token for the specified user. If the user is not the current user, the token will be created as “pending”, and must be activated by the user before it can be used.
token[purpose]
Required string
The purpose of the token.
token[expires_at]
DateTime
The time at which the token will expire.
token[scopes][]
Array
The scopes to associate with the token. Ignored if the default developer key does not have the “enable scopes” option enabled. In such cases, the token will inherit the user’s permissions instead.
PUT /api/v1/users/:user_id/tokens/:id
Scope: url:PUT|/api/v1/users/:user_id/tokens/:id
Update an existing access token.
The ID can be the actual database ID of the token, or the ‘token_hint’ value.
Regenerating an expired token requires a new expiration date.
token[purpose]
string
The purpose of the token.
token[expires_at]
DateTime
The time at which the token will expire.
token[scopes][]
Array
The scopes to associate with the token.
token[regenerate]
boolean
Regenerate the actual token.
DELETE /api/v1/users/:user_id/tokens/:id
Scope: url:DELETE|/api/v1/users/:user_id/tokens/:id
The ID can be the actual database ID of the token, or the ‘token_hint’ value.
This documentation is generated directly from the Canvas LMS source code, available .