Logo
Akamai APIs API Documentation

Create an access token

POST https://{{host}}/edgekv/v1/tokens

Generate an access token that allows an EdgeWorkers code bundle to access the specified namespace. Each token name needs to be unique and have a defined expiration of no longer than six months. You can't renew a token once it expires. To learn more about access tokens, refer to the EdgeKV guide.

 

Body PARAM

Key Datatype Required Description 
accountSwitchKey
string (Optional) For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




RESPONSES

status OK

{ "expiry": "2021-09-30", "name": "my_token", "uuid": "fa3a7ae0-1b0c-45c7-adc3-f0638c6b7466", "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" }



Curl
curl -X POST 'https://host/edgekv/v1/tokens?accountSwitchKey=' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"allowOnProduction":false,"allowOnStaging":true,"expiry":"2021-09-30","name":"my_token","namespacePermissions":{"marketing":["r","w"]}}'

ENDPOINTS