When this happens, it can be very frustrating since it stops you in your tracks, or even causes a downtime of your application.
To start troubleshooting, you may want to check the response that the API gives you. In nearly all cases, authentication fails with the HTTP status code 401:
There are different possible reasons for an HTTP 401, including:
- Your API key does not exist (like in above screenshot)
- Your API key is no longer valid
- You can check this inside your Netilion Connect Subscription page
- Your user credentials are invalid (if using Basic authentication)
- Your Access token is expired (if using OAuth 2.0 authentication)
- In this case, your application needs to use the refresh token to get a new access token. For more info see the developer page.
There is also a HTTP 402 response which means that a Quota (e.g. request quota, data storage quota, etc.), of the Netilion Connect subscription you are doing the request through, has been exceeded. In that case, you need to upgrade your subscription or, in the case of exceeded storage, delete some files to free up the storage again.
Important Note: Some of you may be here looking at this article because it suddenly stopped working after April 3, 2023, and none of the reasons above apply to you. This may be because on that date, Basic Authentication was turned off for normal users on that date. You can keep on using Basic Authentication only with Technical users.