RESTfulAPI invalid token

Hi,

I’m trying out some basic stuff using your restfulAPI in my browser. I’m trying to change a LED in the app. I created a new project, added a LED on pin V0 and copied the token (haven’t connected an ESP8266 or so yet).

Then in the browser I went to: http://docs.blynkapi.apiary.io/#reference/0/write-pin-value-via-put/write-pin-value-via-put?console=1, and put in the following parameters:

auth_token: 7671000d1b2a4b8b868b9760ae4e405f (which was generated by the app)
pin: V0

creating the following URL: http://blynk-cloud.com/7671000d1b2a4b8b868b9760ae4e405f/update/V0

content type: application/json
body : [“0”]

When I press “call resource” I get the following response:

400
HEADERS
server:Cowboy
connection:keep-alive
content-type:text/plain;charset=utf-8
access-control-allow-origin:*
content-length:14
x-newrelic-app-data:PxQDVFVRCQITVlZRDgcFV0YdFGQHBDcQUQxLA1tMXV1dSnwZQRNWERdcRE42NmwcH05DTgcfB1ZXHQYdUlFQUglWAFUBFBYDB0cVQwcAUQYHVQJZBFRdAgZGTQRWXUQDOQ==
date:Thu, 06 Jul 2017 10:33:38 GMT
via:1.1 vegur
BODY

Invalid token.

I tried with several tokens generated by the app, but this wasn’t working either. Is there something I’m doing wrong?

Cheers,

Ruben

Try a simple GET in a browser.

LED full ON:

http://blynk-cloud.com/7671000d1b2a4b8b868b9760ae4e405f/update/V0?value=255

LED full OFF:

http://blynk-cloud.com/7671000d1b2a4b8b868b9760ae4e405f/update/V0?value=0

1 Like

Okay this works indeed, how would I be able to integrate this in ifttt?

There are several IFTTT threads on this site but ensure you look at the most recent.

Many IFTTT features are now covered directly in Blynk and don’t have the lag you get with IFTTT.