Giter Site home page Giter Site logo

Comments (17)

joedawson avatar joedawson commented on August 20, 2024 2

from youtube.

joedawson avatar joedawson commented on August 20, 2024

@aanandshekharroy what do your tokens look like though in your database? I asked in #22 but you didn't say:

It should look like this:

{
  "access_token": "ya29-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "1/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "created": 1450033203
}

from youtube.

aanandshekharroy avatar aanandshekharroy commented on August 20, 2024

@joedawson I don't have "refresh_token" in my database, except this, everything is there.

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Okay, you should be getting a refresh token. I'll look into it to see what it might be and get back to you.

from youtube.

joedawson avatar joedawson commented on August 20, 2024

@aanandshekharroy I also recommend truncating your youtube_access_tokens table and trying to authenticate again.

from youtube.

mossen avatar mossen commented on August 20, 2024

@aanandshekharroy Same issue here. Don't get the refresh_token field.

from youtube.

mossen avatar mossen commented on August 20, 2024

done the same thing as: http://stackoverflow.com/questions/10827920/not-receiving-google-oauth-refresh-token
and the problem solved.

from youtube.

mossen avatar mossen commented on August 20, 2024

Now the issue is how to get new access token using refresh_token?

from youtube.

joedawson avatar joedawson commented on August 20, 2024

It should automatically handle tokens. You don't need to do anything to get
a new token.

On Tuesday, 5 July 2016, moh3n65 [email protected] wrote:

Now the issue is how to get new access token using refresh_token?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#26 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA9oIB-XrEi6gQ7Y5XbEsKwLcZH7aGB1ks5qSgoegaJpZM4JCBJ_
.

from youtube.

mossen avatar mossen commented on August 20, 2024

have set approval_prompt to:
'approval_prompt' => 'force'
and deleted every rows from table which are not included "refresh_token", means the last row must have the refresh_token so it can get access_token again and again.
It works fine now.

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Closing due to inactivity @aanandshekharroy, please feel free to create a new issue if you still require help.

from youtube.

vishalmandora avatar vishalmandora commented on August 20, 2024

Once I've go through steps you given in this library.
{ host }/youtube/auth

This URL redirects to login page. & after successfully login with required permission. I'm able to upload video till 1 hour. then after it doesn't work.

Please reply asps.

Thanks in advance.

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Please delete all tokens in the database and re-authenticate.

from youtube.

vishalmandora avatar vishalmandora commented on August 20, 2024

All tokens removed from database & after that i've again followed same step.
{ host }/youtube/auth
and received following object in database
{
"access_token": "{access_token}",
"expires_in": 3598,
"token_type": "Bearer",
"created": 1494248251
}
NOTE : here, access_token is removed intensionally

But this will also expiry in next 60 minutes. So, what should i do now.

My question is 'm using cron job to upload videos. What should i do to prevent login prompt each time i upload video?

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Something isn't set up correctly, you should have:

{
  "access_token": "XXXXXXXXXXXXX",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "XXXXXXXXXXXXX",
  "created": 1450033203
}

Notice refresh_token? Try this: http://stackoverflow.com/a/10857806

from youtube.

vishalmandora avatar vishalmandora commented on August 20, 2024

After following steps on following URL http://stackoverflow.com/a/10857806
I've received following thing in database

{
  "access_token": "XXXXXXXXXXXXXX",
  "expires_in": 3600,
  "refresh_token": "XXXXXXXXXXXXXX",
  "token_type": "Bearer",
  "created": 1494302399
}

What's next ? I mean after 3600 seconds.

from youtube.

vishalmandora avatar vishalmandora commented on August 20, 2024

Thanks a lot @joedawson . Everything works fine. as per my expectation.

Thanks Again.

from youtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.