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:
Application
Read Only:true
-
created:
string
Title:
Created
Read Only:true
-
description:
string
Title:
Description
-
expires:
string(date-time)
Title:
Expires
Read Only:true
-
id:
integer
Title:
Id
Read Only:true
-
modified:
string
Title:
Modified
Read Only:true
-
refresh_token:
string
Title:
Refresh token
Read Only:true
- related: string
-
scope:
string
Title:
Scope
Default Value:write
Allowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. -
summary_fields:
string
Title:
Summary fields
Read Only:true
-
token:
string
Title:
Token
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
-
user:
integer
Title:
User
Read Only:true
The user representing the token owner
Response
Supported Media Types
- application/json
201 Response
Root Schema : UserPersonalToken
Type:
Show Source
object
-
application:
integer
Title:
Application
Read Only:true
-
created:
string
Title:
Created
Read Only:true
-
description:
string
Title:
Description
-
expires:
string(date-time)
Title:
Expires
Read Only:true
-
id:
integer
Title:
Id
Read Only:true
-
modified:
string
Title:
Modified
Read Only:true
-
refresh_token:
string
Title:
Refresh token
Read Only:true
- related: string
-
scope:
string
Title:
Scope
Default Value:write
Allowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. -
summary_fields:
string
Title:
Summary fields
Read Only:true
-
token:
string
Title:
Token
Read Only:true
-
type:
string
Title:
Type
Read Only:true
-
url:
string
Title:
Url
Read Only:true
-
user:
integer
Title:
User
Read Only:true
The user representing the token owner