Every VTEX API integration needs to authenticate through appKey and appToken.
Only the Master user of the store has permission to deal with tokens. The Master user is the one whose email is in the Contact section of the Accounts screen, in Account management.
To create these keys, follow these steps:
- In the new admin's sidebar, click on Account Management and then on Accounts.
- Type your account name in the Search bar and then hit the Enter button.
- Click on your account name. You'll be redirected to the Edit account page.
- In the Security section, click on Generate appKey and appToken.
- Enter a label for the appKey and appToken pair you're creating.
- Click on Generate new Tokens.
- The token is in the field that is shown next. For a matter of safety, it is shown only once. Copy this token and save it in a safe place.
Attention: every appKey and appToken pair, once is created, is born without link to an access profile. So, after creating it, you should link it to the correspondent access profile.
For that, follow these steps:
- In the Security section, inside the Accounts tab, copy the needed appKey, which is in the Application key column.
- Still inside the License Manager, enter the Users tab and search for the key you copied.
- Enter the user and link it to the profiles you want. This appKey will be able to authenticate integrations with the modules and features to which the chosen profile gives access.
After performing these procedures, authenticate to the API using x-vtex-api-appKey and x-vtex-api-appToken as follows:
- Use the x-vtex-api-appKey for the Application Key informed in the Account management
- Use x-vtex-api-appToken for the Token that was generated in Account management
In different systems, provided by others or not, usually the appKey corresponds to the user and the appToken to the passoword.