A
A
Alexander2017-09-16 19:13:17
Google
Alexander, 2017-09-16 19:13:17

How to get refresh_token in youtube api?

People! Help out! For 3 days I have not got out of the search and Google documentation. I'm working with youtube api, everything is fine, but when authorizing, google sends a temporary token. In json'e which comes from Google there is no refresh_token'a. I sifted through all the documentation, but did not receive answers to my questions.
I set access_type = offline as required by google in order to be able to get a refresh_token, but nothing comes out.
I am writing an application in which permanent authorization is not acceptable, it is necessary to update the access_token on the server side without verifying rights on the client (browser).
Help me please! It seems I'm doing everything right, but I can't get a refresh_token.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-09-16
@BugFixMan

Problem solved! It turns out that it was necessary to set the approval_prompt parameter to force.
An additional window appears
. If you call the approval_prompt parameter with any other parameter, then there will be no refresh_token in the json array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question