How to Create Access Keys

Learn how to create access keys to manage your ERC-4337 gas policies through the Gas Manager Admin API.

What are access keys?

Access keys serve as authentication tokens needed to interact with the Gas Manager Admin API. These APIs empower you to manage your gas policies for sponsoring user operations, and you are required to include an access key in the authentication header for all Gas Manager Admin API requests.

📘

Access Keys Are Available on Growth and Enterprise Tiers

The ability to create access keys is exclusively available to users on the Growth or Enterprise Tiers, as the Gas Manager Admin APIs are only accessible to these tiers. For team accounts, only those with admin permissions are able to create an access key.


How to Generate an Access Key

  1. Start by opening your Alchemy Dashboard, where you'll find a list of your apps. Move your cursor over the "profile" option situated at the top right corner and then select the "settings" option.

  2. Once inside the settings, choose the "Access Keys" option.

  3. Now, click on the "Create Access Key" option to generate a new access key.

  4. Fill in the necessary details for your new access key and then hit "Create". Below, you'll find an explanation of what each field signifies:

    FieldDescription
    NameAn identifier for your access key.
    PermissionsDictates whether your access key holds read / write permissions. If the access key only has read permissions, you won't be able to create, delete, or update policies.
    Expiry DateOptional field. If set, the access key will cease to work after this date.

  5. As soon as the new access key is successfully created, it will be displayed to you. This is a one-time view!

🚧

One-Time View Only

Note that this access key will only be viewable one time. Please save this access key in a secure location.

That's it!

Post-creation, the access key will be listed under the access keys list from where you can delete it if required.


How to Implement Access Keys

Access keys must be included in the authentication header when making Gas Manager Admin API requests. Below is a sample of a Create Policy request:

To construct more requests for different API endpoints, please refer to their respective pages on the Gas Manager Admin API:

That concludes our tutorial!

With these steps, you can now successfully create and use access keys with the Gas Manager Admin APIs.