How to use spark api

how do i use the api commands… enter them into a web browser? use in terminal?
using the sample app “CONTROL LEDS OVER THE ‘NET”, what do i do with:

POST /v1/devices/{DEVICE_ID}/led
# EXAMPLE REQUEST IN TERMINAL
# Core ID is 0123456789abcdef01234567
# Your access token is 1234123412341234123412341234123412341234
curl https://api.spark.io/v1/devices/0123456789abcdef01234567/led \
  -d access_token=1234123412341234123412341234123412341234 \
  -d params=l1,HIGH

i understand that i need to substitute core ID and access token info. I have tried putting it into terminal but get "

"code": 400,
  "error": "invalid_request",
  "error_description": "The access token was not found"

thanks for your help

@alan, see this thread.

1 Like

My opinion is that using a REST client is a quick and easy way to use the Cloud API. I posted a small collection of calls which will work with the Postman REST client for Chrome (add on) which should jump start you. Check out the link to my post below:

Let me know if that gets you going or not.

Dave O

1 Like