Create an Access Token for a User
post
/api/v2/users/{id}/personal_tokens/
Make a POST request to this resource with the following access token fields to create a new access token associated with this user.
-
description: Optional description of this access token. (string, default="") -
scope: Allowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. (string, default="write")
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : UserPersonalToken
Type:
Show Source
object-
application:
integer
Title:
ApplicationRead Only:true -
created:
string
Title:
CreatedRead Only:true -
description:
string
Title:
Description -
expires:
string(date-time)
Title:
ExpiresRead Only:true -
id:
integer
Title:
IdRead Only:true -
modified:
string
Title:
ModifiedRead Only:true -
refresh_token:
string
Title:
Refresh tokenRead Only:true - related: string
-
scope:
string
Title:
ScopeDefault Value:writeAllowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. -
summary_fields:
string
Title:
Summary fieldsRead Only:true -
token:
string
Title:
TokenRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true -
user:
integer
Title:
UserRead Only:trueThe user representing the token owner
Response
Supported Media Types
- application/json
201 Response
Root Schema : UserPersonalToken
Type:
Show Source
object-
application:
integer
Title:
ApplicationRead Only:true -
created:
string
Title:
CreatedRead Only:true -
description:
string
Title:
Description -
expires:
string(date-time)
Title:
ExpiresRead Only:true -
id:
integer
Title:
IdRead Only:true -
modified:
string
Title:
ModifiedRead Only:true -
refresh_token:
string
Title:
Refresh tokenRead Only:true - related: string
-
scope:
string
Title:
ScopeDefault Value:writeAllowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. -
summary_fields:
string
Title:
Summary fieldsRead Only:true -
token:
string
Title:
TokenRead Only:true -
type:
string
Title:
TypeRead Only:true -
url:
string
Title:
UrlRead Only:true -
user:
integer
Title:
UserRead Only:trueThe user representing the token owner