Jump toUpdate content
How to create API keys
API keys are unique identifiers necessary to use the Scaleway API. You can generate API keys for yourself or for an IAM application via the Scaleway console. Each API key is scoped to one Organization only (so if you are part of multiple Organizations, you will need a different API key for each one). Each user and application can have multiple API keys in each Organization.
API keys always inherit the permissions of their bearer (the IAM user or IAM application with which they are associated), giving that bearer the exact rights and permissions that have been defined for them in the Organization via policies.
- You can only generate API keys for yourself, and for IAM applications. You cannot generate API keys for other IAM users, regardless of your permissions.
- You can attach API keys to your own user to test and access your infrastructure, but we do not recommend this for all use cases.
If you plan to create API keys that will be used for a long period of time, in production for example, we recommend that you use applications as the bearers of these API keys. This way, the API keys are linked to non-human users, and are under no risk of leaving or being removed from the Organization.
- You have an account and are logged into the Scaleway console
Click your name in the list of users. You are taken to your user dashboard.
Click the Credentials tab. The following screen displays:
Click the «Plus Icon» button to generate a new API key. The following screen pops up:
Enter an optional description for your API key, and select a preferred Project for Object Storage.Note:
Preferred Projects for Object Storage - When creating and/or listing Object Storage buckets via the API, there is no available parameter to specify the Project in which you wish to list or create buckets. All buckets you create via the API will therefore be created in the preferred Project you choose when creating the API key. Similarly, when listing buckets, buckets from your preferred Project will be listed. Note that:
- This only applies to the creation and/or listing of Object Storage buckets, and no other products or resources.
- You can still create and/or list buckets in your Project of choice via the Scaleway console.
Click Generate API Key. A screen displays showing the access key and secret key for your new API key and reminding you that this is your only chance to securely save the secret key:
Ensure you have securely saved the secret key, then close the window. You are returned to the Credentials tab, where your new API key now appears in the list.
Click the Applications tab. A list of the Organization’s IAM applications displays.
Click the name of the application you want to create an API key for. Alternatively, click «See more Icon» next to the application, and select Overview. Either way, you are taken to the application’s Overview tab.Requirements:
Follow this procedure to create an application, if you have not created one yet.
Click the API keys tab.
Click the «Plus Icon» button to generate a new API key. The API key creation wizard displays:
Complete the information in the wizard as described in step 5 above.
Click Generate API Key. A screen displays showing the access key and secret key for the new API key and reminding you that this is your only chance to securely save the secret key:
Ensure you have securely saved the secret key, then close the window. You are returned to the API keys tab, where the new API key now appears in the list.