Getting a refresh token from OAuth.io through REST API

413 Views Asked by At

I'm trying to get a refresh token for Google through Oauth.io but I'm having trouble finding the endpoint to send the code to. I'm using C# so I can't use the server-side SDK. I've also looked at Getting refresh tokens from Google with OAuth.io but that answer doesn't help me get the actual refresh token. I've looked at their server-side flow documentation which tells me I can get my refresh token at /auth/access_token but when looking at the web API documentation I don't see that endpoint listed.

I've also looked at their example here and I don't see the endpoint they use listed on the API documentation either. It also doesn't say which key/secret to use with that request - is it the one listed for my OAuth.io app, or is it the one for my provider (in this case Google)?

Any help going forward would be greatly appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

I've just updated the documentation on docs.oauth.io, it was effectively /auth/access_token.

Take a look at the node.js SDK implementation: https://github.com/oauth-io/sdk-node/blob/master/coffee/lib/authentication.coffee#L99

The request is a POST on https://oauth.io/auth/access_token and require 3 parameters:

  • code : the code to be exchange against the access token / refresh token
  • key : the OAuth.io public key
  • secret : the OAuth.io secret key