Google-api-javascript-client: gapi.auth2.authorize authorization code doesn't return refresh token

Created on 14 Jun 2018  路  2Comments  路  Source: google/google-api-javascript-client

Hi,
I have a website that require multiple client id to get offline access to youtube Analytics API. I front Side I am using:
gapi.auth2.authorize
As it covers the use case of multiple client id. I an response_type, I am passing code and the token . Example of the parameters :

{
client_id: "the client id",
'scope': " the sope",
'prompt': 'select_account',
'response_type': 'code token',
}

I use authorization code that return it to exchange it in the server side to get the access token and refresh token .
However, It doesn't contain a refresh token, I used the PHP method fetchAccessTokenWithAuthCode

All 2 comments

To get a refresh token, you should put 'access_type': 'offline' in your options.

did you find a way to get the refresh_token?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

caesarsol picture caesarsol  路  6Comments

wonderfly picture wonderfly  路  3Comments

dominikstrasser picture dominikstrasser  路  4Comments

dotproto picture dotproto  路  4Comments

indapublic picture indapublic  路  6Comments