Getting a refresh token from OAuth.io through REST API

本秂侑毒 提交于 2019-12-11 20:19:33

问题


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:


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


来源:https://stackoverflow.com/questions/27827359/getting-a-refresh-token-from-oauth-io-through-rest-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!