Skip to main content

Create User Access Token

POST 

https://api.powerapi.com/api/v1/organisations/me/users/:id/access_tokens

Allow admin to generate access tokens for group_manager and business manager users from organisation

Request

Path Parameters

    id stringrequired

Bodyrequired

    data objectrequired
    id stringrequired
    type stringrequired

    Possible values: [users]

Responses

Returns access token for given user
Schema
    access_token stringrequired

    Access token

    Example: 412e4ce497df832272db63c627a00...
    token_type stringrequired

    Token type

    Example: Bearer
    expires_in integerrequired

    Token expiration time in seconds

    Example: 2419200
    refresh_token stringrequired

    Token that can be used to obtain new access token

    Example: KF0Pwsoz9bDyglLsvDN9hee2_gtF...
    scope stringrequired

    Scope

    Example: trusted public
    created_at integerrequired

    Token creation time in seconds

    Example: 1582219200

Authorization: http

name: bearertype: httpscheme: bearerbearerFormat: JWT
curl -L 'https://api.powerapi.com/api/v1/organisations/me/users/:id/access_tokens' \
-H 'Content-Type: application/vnd.api+json' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"data": {
"id": "string",
"type": "users"
}
}'
Request Collapse all
Base URL
https://api.powerapi.com
Auth
Parameters
— pathrequired
Body required
{
  "data": {
    "id": "string",
    "type": "users"
  }
}
ResponseClear

Click the Send API Request button above and see the response here!