Generate OAuth Access Token
POST
/api/v1/auth/token
const url = 'https://example.com/api/v1/auth/token';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/auth/tokenGenerate a new OAuth access token using service principal credentials
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
TokenResponse
Response model for token generation.
object
access_token
required
Access Token
string
token_type
Token Type
string
expires_in
required
Expires In
integer
workspace
required
Workspace
string
Example
{ "token_type": "Bearer"}