Authentication
To access the Seller Assistant API, you need to authenticate your requests using an API key. This section provides detailed instructions on how to generate, use, and manage your API key to ensure secure and efficient interaction with the API.
Generating an API Key
To authenticate with the Seller Assistant Public API, you first need to generate an API key. Follow these steps to obtain your API key:
Header Parameter Method
You can include the API key as a header X-Api-Key
.
Here’s an example:
GET /api/v1/resource/{resource_id}
Host: api.sellerassistant.app
X-Api-Key: YOUR_API_KEY
Security Best Practices
To ensure the security of your API key and protect your account, follow these best practices:
- Keep Your API Key Confidential: Do not share your API key with anyone. Treat it like a password.
- Rotate Your API Key Regularly: Periodically regenerate your API key to minimize the risk of unauthorized access.
- Use Secure Connections: Always use HTTPS to encrypt your API requests and responses.
- Limit Exposure: Avoid exposing your API key in public repositories, client-side code, or unsecured environments.
Managing Your API Key
You can manage your API keys from the API Keys section in your Seller Assistant App account. This includes generating new keys, regenerating existing keys, and revoking keys that are no longer needed.
Regenerating an API Key
If you suspect that your API key has been compromised or if you simply want to rotate your key, you can regenerate it:
Revoking an API Key
If an API key is no longer needed or you want to disable it, you can revoke it:
Error Handling
If your API request is not authenticated correctly, you will receive a 403 Access Denied
. Ensure that your API key is included correctly and that it is valid. Below is an example of an unauthorized response:
{
"code": "access_denied",
"message": "API Token is invalid",
"trace_id": "4a7d3782-2ab2-435f-8475-62b7f4a9394c"
}