1

I don't know how to request an refresh token with Javascript for Google APIs.

I've tried these: https://developers.google.com/accounts/docs/OAuth2WebServer#offline

But I don't know how to get the response.

1
  • Did you try any code? Or you are unsure of how OAuth operates? Commented Nov 7, 2013 at 7:21

1 Answer 1

3

You can't request a refresh token from Javascript (at least not in a browser). The URL you posted is describing the web server flow, which is the only place you can get a refresh token.

Sign up to request clarification or add additional context in comments.

2 Comments

Are you sure of this because the api doc lists acesstype as one of the parameters that can be passed - developers.google.com/+/web/signin/…
you're right. however if you read on you will see "If using the server-side sign-in flow and you want to get a refresh token". Delivering a refresh token to a javascript client would blow a huge hole in the oauth security model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.