Create an access token

Generate an access token that allows an EdgeWorkers code bundle to access the specified namespace. Any new tokens that you create refresh automatically without expiring. You don't need to update tokens inside your edgekv_tokens.js file. Tokens created before the enhanced token workflow implementation will still expire. You need to replace these expired tokens in your code bundle. To learn more about access tokens, refer to the EdgeKV guide.

Query Params
string

For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Body Params
boolean
required

Whether to allow this token access to the Akamai production network.

boolean
required

Whether to allow this token access to the Akamai staging network.

string
required
length between 1 and 32

Friendly name of the token. Used when retrieving tokens by name.

namespacePermissions
object
required

Namespace identifiers the token should have access to, plus the associated read, write, and delete permissions. All specified namespaces need the same database data access policy. A namespace's data access policy comes from the value of the restrictDataAccess, set when creating a namespace.

restrictToEdgeWorkerIds
array of strings

A set of EdgeWorker IDs authorized to access EdgeKV via the token. By default if you omit this array, the token authorizes access for all IDs.

restrictToEdgeWorkerIds
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json