API Key Authentication
Virto commerce supports simple authentication based on sending an API key across all requests to authenticate a user.
One of the clear advantages of using API key authentication is its inherent simplicity. It is a single key that allows you to authenticate just by including it. This simplicity also enables the user to make calls easily, with cURL, interactive docs, or even in their browser.
Create API key¶
To create a new API key:
- Open platform and click Security in the main menu.
- In the next blade, click Users.
- In the next blade, select the desired user.
- In the next blade, click on the Api key widget.
-
Click Generate in the toolbar. The Api key appears in the corresponding field:
1. Click OK to save the changes.
Note
Each API key must be associated with a user account, as all requests with an API key will be authorized on behalf of the user that API key is associated with.
Use API Key¶
You can include the API key into a REST API call as a query parameter with the following format (replace API_KEY with the key string of your API key):
Alternatively, you can use the api_key
header to provide your key: