Create a new long-lived service token

services_post_tokens(id, name, machine_token = NULL)

Arguments

id

integer required. The ID of the service.

name

string required. The name of the token.

machine_token

boolean optional. If true, create a compact token with no user information.

Value

A list containing the following elements:

id

integer, The ID of the token.

name

string, The name of the token.

user

list, A list containing the following elements:

  • id integer, The ID of this user.

  • name string, This user's name.

  • username string, This user's username.

  • initials string, This user's initials.

  • online boolean, Whether this user is online.

machineToken

boolean, If true, this token is not tied to a particular user.

createdAt

string, The date and time when the token was created.

token

string, The value of the token. Only returned when the token is first created.