Get your API Client
Create an API Client for your Project
You must first set up an API Client before your applications can interact with your Project. An API Client includes authentication information and permission scopes to determine the endpoints the API Client can interact with.
Learn more about Composable Commerce OAuth 2.0 for API authentication in our self-paced Authorization flows and API Clients module.
Objectives of this guide
By the end of this guide you will have:
Create an API Client
In the Merchant Center, click Settings > Developer settings.
On the API clients tab, click Create new API client. On the New API client page, follow these steps:
Enter a name for your API client. The name does not affect how the API functions.
Select the scopes for your API Client. To provide the API Client with complete access, click the drop-down and select Admin client. To follow security best practices, we recommend to keep the scopes to the minimum that is needed.
Click Create API client. On saving, your API Client information is displayed in the Client credential flow section.
The API Client information is only displayed once. Ensure to save the project_key, client_id, secret, scope, API URL, and Auth URL before leaving or closing this page.
Save the API environment variables file
You can manually save your API Client information, or select an option from the drop-down to download your API Client configuration in a format-friendly way for various programming languages.
These configurations can be copied to your clipboard or downloaded.
From the drop-down, select Environment Variables (.env) and click the download icon.
The environment variables file is downloaded to your computer with a placeholder name based on your Project key and the name of your API Client (for example:
project-key_API client name.env
).The environment variables file is a plain text file and can be opened with any text or code editor.
In your downloads folder, select the file and rename the environment variables file
.env
.