v1

latestOpenAPI 3.0.3FortiCNAPP Use License2026-08-041754351.1 MB
ACCESS_TOKENS

Generate Access Tokens

Get access tokens for the API requests by invoking the following endpoint:

POST https://YourAccount.lacework.net/api/v2/access/tokens

After creating a secret key, administrators can generate Temporary API access (bearer) tokens that clients and client applications use to access the FortiCNAPP API. Create temporary API access (bearer) tokens by invoking the POST https://YourAccount.lacework.net/api/v2/access/tokens endpoint.

post/api/v2/access/tokens

Headers

X-LW-UAKSstring required

YourSecretKey

Content-Typestring required

application/json

Request body

keyIdstring required

YourAccessKeyID

expiryTimeinteger required

The access token's expiration (in seconds) that you want to set. Maximum value: 86400 (24 hours).

Example request

{
  "keyId": "YourSecretKey",
  "expiryTime": 3600
}

Response

A temporary access (bearer) token is returned.

expiresAtstring

The timestamp for when the access token expires in RFC3339 date time format (yyyy-MM-ddTHH:mm:ss.SSSZ)

tokenstring

The access token.

Example response

{
  "expiresAt": "2021-08-18T08:00:00.000Z"
}