HTTP 401 since today 16 Feb 2023 (APIKEY not working anymore ?)

Using Coninranking API and hitting http401 if I use my APIKey. Used to work fine before. What is happening ?

So now , I had to disable my authIdKey as per below code… So If I bypass the “http.setRequestProperty”, it works fine…

                if (!authIDkey.isEmpty())
                    http.setRequestProperty("x-access-token", authIDkey);
1 Like

Hi @PhilippeM,

We made a change to how our API handles API keys.

Before
When you had put in an incorrect API key OR any random value, then the API would treat it as if you did not use an API key at all. This meant that you wouldn’t notice that you were using an incorrect API key and you could do only a few requests from your IP address.

Now
When you put in an incorrect API key OR any random value, then the API will give you a response that says you are using an incorrect API key.

So what to do now?
You should replace authIDkey with your actual API key. You can find your API key here.

It looks like this: coinranking9ck32…

Let me know if it works again :+1:

Hi Mark,
tks a lot for your detailed answer. It works again !!!
And you re right I believe, I was using the wrong key before as I has removed the tag “coinranking”. I beleive this is what I read some time before.

So to resume:
If I have a key like “coinrankingd0xxxxxyyyyyzzzzz”
If I put in my code authIDkey=“d0xxxxxyyyyyzzzzz” >>>> Error
If I put in my code authIDkey=“coinrankingd0xxxxxyyyyyzzzzz” >>>> Works

Tks again :slight_smile:

2 Likes

Glad that it works now, well done!

Ah I get your confusion. The word coinranking is part of the key, so you can identify easily that the key belongs to Coinranking.

1 Like