My application is blocked from the SellSN API
When developing applications that work with the SellSN API, you might encounter a HTTP 401 response from our API and a text/html content body which is not the usual response from our API, instead of fussing about your API keys, it can be put down to the following main points:
Most likely: You didn't set a User-Agent header or set one that is invalid;
Your IP address or ASN (Autonomous System Number) is blacklisted from our API due to poor reputation or,
Your API key is invalid or improperly set.
First off you should check that your application is sending a valid User-Agent header to our API, we rely on this header to ensure the legitimacy of your request and if it is improperly set it may cause your request to get blocked.
It's easy to set one, here is an example for JavaScript to set one with the node-fetch library using the user agent My-Application/1.0.0.0 which will be accepted by our API
Your application of adding a user agent may vary depending on the programming language you are using, you can use Google and other resources to figure out how to set one.
In very rare cases, you may find that setting a valid user agent does not fix your problem and if you are here, you might need to check your IP reputation. You can do this with relative ease by using sites such as Talos Intelligence to search your IP address.
You can see your reputation under "Reputation details", in the above screenshot it is neutral which indicates this is probably not the problem, in that case please continue onwards.
The only way to reliably check your API key is by reading the response from our API, as it will indicate whether the key is invalid or not by serving one of the following messages:
Access denied.
Your API key is not allowed to access this endpoint.
In which case, we usually will serve either a HTTP 401 or HTTP 403. If you get this please check the API key or regenerate a new one with the correct permissions.
Please contact our live chat and we'd be happy to help. Please be aware development related issues do usually take a little longer to reach a resolution due to the diagnostics and troubleshooting knowledge our support team needs to have regarding the API - we do not have as many support agents trained to deal with it therefore it may take longer for one to get back to you with the expertise required.
Most likely: You didn't set a User-Agent header or set one that is invalid;
Your IP address or ASN (Autonomous System Number) is blacklisted from our API due to poor reputation or,
Your API key is invalid or improperly set.
How can I fix this?
Setting a valid user agent header on your API requests
First off you should check that your application is sending a valid User-Agent header to our API, we rely on this header to ensure the legitimacy of your request and if it is improperly set it may cause your request to get blocked.
It's easy to set one, here is an example for JavaScript to set one with the node-fetch library using the user agent My-Application/1.0.0.0 which will be accepted by our API
const response = await fetch('https://api.sellsn.io', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${apiKey}`,
'User-Agent': 'My-Application/1.0.0.0'
}
});
Your application of adding a user agent may vary depending on the programming language you are using, you can use Google and other resources to figure out how to set one.
Changing your IP address or ASN
In very rare cases, you may find that setting a valid user agent does not fix your problem and if you are here, you might need to check your IP reputation. You can do this with relative ease by using sites such as Talos Intelligence to search your IP address.
You can see your reputation under "Reputation details", in the above screenshot it is neutral which indicates this is probably not the problem, in that case please continue onwards.
Checking your API key
The only way to reliably check your API key is by reading the response from our API, as it will indicate whether the key is invalid or not by serving one of the following messages:
Access denied.
Your API key is not allowed to access this endpoint.
In which case, we usually will serve either a HTTP 401 or HTTP 403. If you get this please check the API key or regenerate a new one with the correct permissions.
If none of this helps
Please contact our live chat and we'd be happy to help. Please be aware development related issues do usually take a little longer to reach a resolution due to the diagnostics and troubleshooting knowledge our support team needs to have regarding the API - we do not have as many support agents trained to deal with it therefore it may take longer for one to get back to you with the expertise required.
Updated on: 09/10/2024
Thank you!