Refresh Tokens

Refresh tokens can be used to refresh an expired access_token. When you receive your initial access_token you will receive a request_token in the JSON response, as well as an expires_in value. The expires_in value marks the seconds that the current access_token is still valid. After this value reaches zero, a client application will not be able to use the existing access_token.

Refreshing an Access Token

If a token has expired or you simply wish to receive a new access_token you can send your refresh_token along with your client_id and client_secret to https://opro-demo.herokuapp.com/oauth/token and your access_token will be refreshed.

$ curl -X POST -d '' 'https://opro-demo.herokuapp.com/oauth/token?client_id=3234myClientId5678&client_secret=14321myClientSecret8765&refresh_token=4857goldfish827423'

Make sure to replace client_id, client_secret, and refresh_token with your values.

You should get back a response that looks like this:

$ {"access_token":"9693accessTokena7ca570bbaf","refresh_token":"3a3c129ad02b573de78e65af06c293f1","expires_in":7300 }
← back