access-tokenstocktwits

Stocktwits request for Access Token returns a blank page


I'm following the instructions given on this page: https://stocktwits.com/developers/docs/authentication

I've managed to get the client id, client secret and the code without any problems (up to step 4). However, when trying to exchange these for an access token, I'm getting a blank page.

The instructions specify that the return is a json format response - maybe there are some browser settings that I need to check to allow this?

thanks in advance for any pointers.


Solution

  • Judging by the title of this post "returning a blank page" it sounds like you are trying to make this request through the browser. The page you referenced says that the request must be a POST request and browsers cannot make POST requests.

    On the step you're stuck on (step 5) there is a link that says "View the token call" that links here https://stocktwits.com/developers/docs/api#oauth-token-docs which shows how to make this POST request using curl.