All devices URL works sometimes, doesn't work other times


Got a strange issue happening.
I’m hitting with my newly acquired access_token.

When I use Postman it gets the data every time. However, when I use Ruby (or even cURL) it doesn’t work every time. By not working I mean it just returns an empty string. Sometimes it returns data, but most of the time it just returns that empty string.

Here is a GIST of my code example:

Someone please help me figure out what I’m doing wrong!


Thanks for sending the link, I was able to reproduce it using your cURL sample.
For cURL testing, please add the -L flag, which will follow redirects in the response. Also adding -v is helpful to show you the headers and other details.
curl -v -L
-H “Content-Type: application/json”
-H “Authorization: Bearer c.YOUR_TOKEN_HERE”
-X GET “

For the ruby sample, you would need to find a library or add code that handles the redirects, by checking if the HTTP response code is 307. The Redirect URL to follow will be in the response header key “Location”.

Here’s a link that might help with some sample code, close to what you have.

Hope this works for you.