[Solved] Invalid token API call

I’m getting error invalid token when using the example API for get pin value in Apiary. Swapped my token and pin into the example and got the same error. In my VB code I am having the same problem

What do you get when you the following into a browser (with your own auth and pin number)?


via the browser I am getting invalid token for both the token in the apiary example and my own token

Use ip address instead of blynk-cloud.com in this url.[quote=“structure7, post:2, topic:11277”]
To Know the IP address of Blynk cloud server .ping to http://www.blynk-cloud.com from your pc.

ping can not find host

Blynk doesn’t use www, just ping blynk-cloud.com

Got the IP as still invalid token using browser and my VB.

Get yourself a valid token then.

My token works on my Blynk project just fine thanks. I have copy and pasted it into my vb code and the apiary example as well

I assume the token on the example in apiary is valid and that is also giving me an invalid token result.

Could someone from blynk become involved in this thread please and give me some extended help.


@koaiwi the easiest debug is normally through a web browser before you get embroiled in VB.

Have you read about geo-dns and do you think it could apply to you?

Are you using Blynk’s cloud server and if so do you have the Server Settings slider set to BLYNK or CUSTOM. If CUSTOM what IP does it show?

iOS or Android?

Do you have a virtual pin in your project that you can try from a browser with:


and the following or the IP you see in the Server Settings of the app[valid_token]/pin/V[valid_virtual_pin]

1 Like

Yep it was the geo-dns issue. I’m travelling away from the UK at the moment and Dmitriy helped me out with a valid ip address for my android. Put this one in the browser call and it works fine now. Also in my VB code which also now works just fine. I’ve been using VB for 20 years now and done a lot of work with the HTTP calls so thought it must be something to do with the IP address. However, the error is somewhat misleading. Solved - thanks for your help.

1 Like