User
Tokens
Tokens endpoint reference.
List
List all API tokens created for this user.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
params | array | No | [] | Array containing the necessary params. |
php
$response = $client->user()->tokens()->list([]);
Create
Create a new API token.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
values | array | Yes | Token values, requires name and policies. |
php
$response = $client->user()->tokens()->create([]);
Get
Get information about a specific API token.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
tokenId | string | Yes | Token identifier. |
php
$response = $client->user()->tokens()->get('TOKEN_ID');
Update
Update an existing token.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
tokenId | string | Yes | Token identifier. | |
values | array | Yes | Token values, e.g. name, policies, condition, status. |
php
$response = $client->user()->tokens()->update('TOKEN_ID', []);
Delete
Destroy an API token.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
tokenId | string | Yes | Token identifier. |
php
$response = $client->user()->tokens()->delete('TOKEN_ID');
Verify
Test whether a token works.
php
$response = $client->user()->tokens()->verify();

