I’ve been trying to list my tokens via the Cloud API.
I was getting a Unauthorised response back when I send my credentials in using Basic Auth in the header.
GET https://api.spark.io/v1/access_tokens Headers [Accept=application/json,Accept-Encoding=gzip, deflate,Authorization=BASIC BASE64_ENCODED_CREDENTIALS_HERE]
The cloud API complained like anything that I wasn’t sending in any credentials when I was. So I did some adjusting and changed the request to
GET https://api.spark.io/v1/access_tokens Headers [Accept=application/json,Accept-Encoding=gzip, deflate,Authorization=Basic BASE64_ENCODED_CREDENTIALS_HERE]
Which worked. I was wondering if this was a bug or how it was specifically meant to work? Without knowing too much about BasicAuth I figured writing BASIC in any case would be ok. Thought I’d share if anyone else was seeing similar things.