services_post_tokens {civis}R Documentation

Create a new long-lived service token

Description

Create a new long-lived service token

Usage

services_post_tokens(id, name, machine_token = NULL, expires_in = 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.

expires_in

integer optional. The number of seconds until the token should expire

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.

expiresAt

string, The date and time when the token expires.

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.


[Package civis version 3.1.2 Index]