The edgekv Developer Hub

Welcome to the edgekv developer hub. You'll find comprehensive guides and documentation to help you start working with edgekv as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Generate and retrieve EdgeKV access tokens

You need an EdgeKV-specific access token to authorize an EdgeWorker ID to access data within a given namespace. This ensures that only authorized IDs gain access to the data with the proper controls. Tokens will expire, so you will need to generate a new token before an existing one expires, and update it inside your edgekv_tokens.js file. Your EdgeKV calls will fail if an expired token is not replaced.

You can create one or more EdgeKV access tokens per namespace, or create tokens that grant access to multiple namespaces. Before creating your tokens refer to the to the Limitations section to make sure you stay within the overall limit for the number of allowed tokens per account.

To create a token you need to have the EdgeKV Access Token - Create - Create a new EdgeKV Access Token permission associated with your API client.

When you create an EdgeKV access token, you must assign it a unique name. Tokens are securely stored in Akamai’s internal systems until they expire. Anyone with the EdgeKV Access Token - View- List EdgeKV Access Token permission can list tokens or use the assigned name to retrieve a token.

The token create operation will fail if you attempt to create a token with an existing name.


If you used EdgeKV in the previous availability phase, you need to generate new tokens.

Any tokens added to your EdgeWorkers code bundles during our previous availability phase must replaced with a new token. Tokens from the previous phase were revoked at the end of March 2021 for security reasons.

Each access token contains the following fields. Fields marked as "required" must be specified when creating a new token:



Token name

The name specified in the token creation API call. We recommend that you assign a descriptive name that is unique across your entire account to identify your token. You cannot modify an access token name once it has been created.

Issue date

The date the token was issued. Automatically set to the date the token was created.

Expiry time

The token expiration date. For this availability phase, we recommend you set it to a maximum six months from when the token was created.

Valid for EdgeWorker IDs

Lists the EdgeWorker IDs allowed to access the namespace. Defaults to all. (This cannot be changed during the current availability phase.)

Valid on Production

Determines if namespaces can be accessed on the Akamai production network. Can be set to true or false.

Valid on Staging

Determines if namespaces can be accessed on the Akamai staging network. Can be set to true or false.

CP Code

CP code created during EdgeKV initialization. Automatically set to the CP Code created during EdgeKV iniitialization.
Please make sure you do not purge content associated with this CP code to avoid degradation in your EdgeKV performance.

Namespace permissions

Defines the namespace-id and the corresponding enforced namespace access permissions. You can set the permissions to one or more of the following [READ (“r”), DELETE (“d”), WRITE (“r”)] to restrict access to the namespace data.

Access tokens used by an EdgeWorker ID are stored in your local edgekv_tokens.js file, which must be included in an EdgeWorkers code bundle. You can use the administrative API or CLI to create or retrieve a token. The CLI also provides the option to update the edgekv_tokens.js file automatically, whereas using the administrative API requires the use of a separate tool to update the file.

The edgekv_access_tokens dictionary in the edgekv_tokens.js file must be updated with new token name and token value fields when those values change, such as at renewal. These fields are added under a parent key called namespace-.

For example, if we create a token named default_token for the default namespace and another called marketing_token for the marketing namespace, the contents of the file would look similar to this example:

var edgekv_access_tokens = {
                    "namespace-default": {
                       "name": "default_token",
                       "value": "xxx.yyy.zzz"
                   "namespace-marketing": {
                     "name": "marketing_token",
                     "value": "aaa.bbb.ccc"
export { edgekv_access_tokens };

Updated 3 months ago

Generate and retrieve EdgeKV access tokens

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.