Google API - OAuth 2.0 - Get AccessToken and Refresh Token Part-1

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 104

  • @opensourceautomation-afsarali
    @opensourceautomation-afsarali  3 ปีที่แล้ว +4

    Update : I have created new Video with Postman where above issue fixed:
    Please watch video at : th-cam.com/video/8RaSbyk-DJY/w-d-xo.html

  • @NzV123
    @NzV123 3 ปีที่แล้ว +9

    For those with error: invalid_grant.. try regenerating the code from pasting the URL in step 2. worked for me! Thanks man

    • @vincent20091930
      @vincent20091930 3 ปีที่แล้ว +2

      yes it's worked for me too!

    • @mysteryguy1948
      @mysteryguy1948 2 ปีที่แล้ว +1

      Thanks, this worked, to avoid confusion, do the steps again for generating "code" that is explained from 15:24.

  • @josefdeutsch887
    @josefdeutsch887 4 ปีที่แล้ว +31

    how to make everything more complicated ? - ask google

  • @ashiqps3252
    @ashiqps3252 4 ปีที่แล้ว +4

    Thank you sir. I spend a lot of time to find method of access-token. and 30 minute video is really efficient to generate token

  • @opensourceautomation-afsarali
    @opensourceautomation-afsarali  4 ปีที่แล้ว

    Please watch playlist for Gmail Access and Email automation here :
    th-cam.com/play/PLXBKC3hh6AEqpcgZpoIhRoUeads9nu8uG.html

  • @upl1nk.v01d2
    @upl1nk.v01d2 2 ปีที่แล้ว

    I finally made some progress! At least with curl I got both tokens. :)
    An absolute thanks to author of this tutorial!!

  • @haisonglim6017
    @haisonglim6017 4 ปีที่แล้ว +3

    Explaination is very clear. I learn a lot.

  • @opensourceautomation-afsarali
    @opensourceautomation-afsarali  4 ปีที่แล้ว

    Please watch another video for automated way to create Access Token and Refresh Token
    th-cam.com/video/jhxzhpFanfU/w-d-xo.html

  • @sivaphani8306
    @sivaphani8306 2 ปีที่แล้ว

    Thank you very much. I was looking for this content and I found that this is very useful if this kind of video is not there then I need to spend a lot of time. This video save a lot of time for me.

  • @marc-andrequintal570
    @marc-andrequintal570 ปีที่แล้ว

    thank you for sharing! it was exactly what I was looking for (how to regenerate access_token without asking user) great job !

  • @veladisravankumar2635
    @veladisravankumar2635 3 ปีที่แล้ว

    Thank you sir. you gave excellent topic with clear explanation. I followed by you steps. It's working fine.

  • @opensourceautomation-afsarali
    @opensourceautomation-afsarali  4 ปีที่แล้ว +4

    Hi Everyone ,
    If you are facing issues with curl command then please copy the command and paste in text editor first and fix if there are any trailing spaces or some special characters : then paste into the terminal/command prompt .
    Thanks

  • @DefuseFitness
    @DefuseFitness 4 ปีที่แล้ว +8

    i am getting {
    "error": "unsupported_grant_type",
    "error_description": "Invalid grant_type: "
    } when use curl command can you please hepl?

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  3 ปีที่แล้ว

      Please watch my latest video where all issue i resolved. th-cam.com/video/8RaSbyk-DJY/w-d-xo.html

  • @madhusudhan5984
    @madhusudhan5984 3 ปีที่แล้ว +1

    Best ever explanation.Thanks.

  • @sammylee670
    @sammylee670 4 ปีที่แล้ว +1

    Your video is very informative.

  • @ducdo4930
    @ducdo4930 2 ปีที่แล้ว

    You have saved my week. I am a new dev. Thanks a lots :)

    • @NamLe-sl4qy
      @NamLe-sl4qy 2 ปีที่แล้ว

      người anh em đây r 🤣, công nhận ông này hướng dẫn chuẩn, xem mấy thằng khác hướng dẫn như cl, tìm cả ngày đ' xong =))

  • @95daoge66
    @95daoge66 4 ปีที่แล้ว +4

    google should pay money for you!!!!!

  • @kemsekov6331
    @kemsekov6331 3 ปีที่แล้ว +2

    invalid grant type everytime i try do post

  • @managersoft4512
    @managersoft4512 ปีที่แล้ว

    one question ,,, this project has functionality for current date . ?

  • @junaidkhanmomin7955
    @junaidkhanmomin7955 2 ปีที่แล้ว +1

    For error "invalid_grant.." try regenerating the "code" from pasting the URL. It is explained from 15:24.

  • @houaidakrifa6091
    @houaidakrifa6091 2 ปีที่แล้ว

    It's very helpful ❤👏

  • @hardikkkraval
    @hardikkkraval 3 ปีที่แล้ว

    Awesome explanation..

  • @averycomingsoon6486
    @averycomingsoon6486 4 ปีที่แล้ว +1

    many thanks my friend

  • @AdityaKumar-jf7yb
    @AdityaKumar-jf7yb 4 ปีที่แล้ว +2

    Thank you very much for this video, I was trying it for 2 days and never tries with "curl", I did with the postman or using a script but both fail and don't have any idea how to do so. You save my day, but can you tell what is the issue with the postman?
    It will be really helpful.

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      Aditya Kumar Thanks for watching and am glad that was helpful to you ..Please subscribe and share my channels for more useful topics .
      As far as the issue with postman is , it seems it is not converting the post body to a url encoded format ..

    • @salmaabokamla5727
      @salmaabokamla5727 4 ปีที่แล้ว

      @@technologysolutions9947 i did it but it isn't working with me
      {
      "error": "invalid_client",
      "error_description": "The OAuth client was not found."
      }

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      @Mahesh Garapati Please watch my latest video where things are more clean :
      th-cam.com/video/jhxzhpFanfU/w-d-xo.html

  • @anupritasapate1045
    @anupritasapate1045 2 ปีที่แล้ว

    Thankyou for the video, very helpful. I had one question, if the refresh token gets expired after 7 days will we get the screen to authenticate?

  • @siddheshkadam2138
    @siddheshkadam2138 4 ปีที่แล้ว

    It's very helpful 👍

  • @Etanmm
    @Etanmm ปีที่แล้ว +1

    If anyone is having the "invalid grant_type" error returned, try regenerating the code but make sure the "include_granted_scopes" is set to false. Not sure why but that fixed it for me.

  • @Informaticsgod
    @Informaticsgod 4 หลายเดือนก่อน

    can you create one automation tool which can create bulk gmail json file by providing combination of gmail email and password?

  • @sauravmohapatra1
    @sauravmohapatra1 3 ปีที่แล้ว

    Thanks Sir! It was helpful!!

  • @rachanasingh1951
    @rachanasingh1951 3 ปีที่แล้ว

    Hi. How can we get data from play store about count of downloads of an app using Google API. What is the next step after taking access token and refresh token..early reply is appreciated

  • @SuhasDalvi-uk5qg
    @SuhasDalvi-uk5qg ปีที่แล้ว

    Soham here from Pune (India); I have a simple web app developed and hosted using a google app script web app, which is an extension of GAS-GS CRUD APP. I want to enhance it to make it available only for confined email accounts without giving access to spreadsheets. Do you do freelancing? If yes, I would like to add that feature to the GAS-GS CRUD APP so that only the email ID stored in the spreadsheet can access the app. OR can you please help me develop that feature OR point me to someone who can help? thanks!!

  • @MarcoChavez1940
    @MarcoChavez1940 4 ปีที่แล้ว +1

    SO MANY THANKS!!!!

  • @adimabfalin252
    @adimabfalin252 4 ปีที่แล้ว +1

    good job bro! :) you did well, keep it up even no one is watching :D

  • @mucahityusufzirek6725
    @mucahityusufzirek6725 4 ปีที่แล้ว +1

    I couldn't understand what he was doing after 19:32.
    you used an application how do we do that part?

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      Hi Yusuf .. In this particular time ..i tried to send an POST API call using POSTMAN tool . but unfortunately it did not worked for me . Hence I tried the same using command line .
      Instead you need to follow from 20:30 (th-cam.com/video/tGDn3V-mIOM/w-d-xo.htmlm30s ) .
      If still have issue please follow my another video where you can easily generate Access Token and Refresh Token.
      Please watch : th-cam.com/video/jhxzhpFanfU/w-d-xo.html

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      Please subscribe and Like if this video helped your issue resolved.
      Thanks

  • @saifalisanadi6519
    @saifalisanadi6519 4 ปีที่แล้ว +1

    Fantastic content.. I'm also looking for similar solution but for O365 Teams to test message ( the teams message has a adaptive card with button that need to be clicked to approve or reject the request). How do I write this in selenium web driver c#. This specific flow is quite challenging for me...

  • @JuanRamirez-vy4fh
    @JuanRamirez-vy4fh 3 ปีที่แล้ว

    thanks bro, you are the best

  • @travelwithdivy
    @travelwithdivy 4 ปีที่แล้ว +1

    Got the job done boss!

  • @tuabijakIT
    @tuabijakIT 3 ปีที่แล้ว

    hi dude thanks a lot, but i want ask ,,,when we call grant_type=refresh_token it will need refresh_token as input , my question is does the refresh_token from out of authorization_code will expire ?

  • @maxmobility9538
    @maxmobility9538 4 ปีที่แล้ว

    "error": "invalid_request", "error_description": "Parameter not allowed for this message type: code" ptovide this error when I create google doc' api token

  • @destructionking958
    @destructionking958 ปีที่แล้ว

    What would be the redirect url for desktop application?

  • @vincent20091930
    @vincent20091930 3 ปีที่แล้ว

    this is great!!!!!!!!!!!!!!!!!!!!

  • @eslamakrm2750
    @eslamakrm2750 ปีที่แล้ว

    can i send the username and password as a parameters . so i don't need the user to login i want him to use my google account ...

  • @cheesecake-boi
    @cheesecake-boi ปีที่แล้ว

    This saved my day

  • @venkatram3936
    @venkatram3936 3 ปีที่แล้ว +1

    How to do it from Android app

  • @nitishborkar3316
    @nitishborkar3316 3 ปีที่แล้ว

    Hi I am getting no response_code error while enabling gmail

  • @armanulalam4560
    @armanulalam4560 3 ปีที่แล้ว

    Thank you.

  • @manishmg3994
    @manishmg3994 ปีที่แล้ว

    how to get permanent access token , so that we no need to authenticate

  • @mariomar222
    @mariomar222 3 ปีที่แล้ว

    Hi, thank you very much for the great tutorial.
    A question;
    Do you always have to generate a new code?
    Because after generating the code the first time, you use the access_token, then from the second time you use the refresh_token, but when it expires and you try to use the code again, it tells you that the code expired.
    How should i do it?
    Thx!!!

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  3 ปีที่แล้ว

      Thanks for watching the video !! as for your question regarding CODE , you dont need to use code anymore its a onetime thing if you are using Refresh Token to generate AccessToken. In case you are using code way to generate access and refresh token you need to generate code each time.

  • @testautomationcase8402
    @testautomationcase8402 3 ปีที่แล้ว

    Hi, Can you please explain how to reply to an existing mail using oauth 2.0

  • @AnilThakur-lx6ps
    @AnilThakur-lx6ps 2 ปีที่แล้ว

    Can we get youtube using gmail access token ?

  • @ИванКазначеев-д4т
    @ИванКазначеев-д4т 4 ปีที่แล้ว +1

    Thanks a lot!

  • @purooshottampareta6123
    @purooshottampareta6123 2 ปีที่แล้ว

    Sir can you make video on how to can access token from box into Java. Please

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  2 ปีที่แล้ว

      Hi purooshottam
      Thanks for watching ! You can find video here th-cam.com/play/PLXBKC3hh6AEqpcgZpoIhRoUeads9nu8uG.html

  • @Meenucha
    @Meenucha 4 ปีที่แล้ว

    I have followed the same steps told by you, however, I am getting an "invalid grant" error on command prompt as well. Can you please help?

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว +1

      You can also see below
      th-cam.com/video/jhxzhpFanfU/w-d-xo.html

    • @kentwood9821
      @kentwood9821 4 ปีที่แล้ว

      I'm getting 'invalid grant' with CURL as well. Can you address this without referring us to the nodejs video? Really appreciate your excellent work!

  • @priyankayendhe3976
    @priyankayendhe3976 4 ปีที่แล้ว

    getting error : {
    "error": "unsupported_grant_type",
    "error_description": "Invalid grant_type: "
    }

    • @andadana799
      @andadana799 4 ปีที่แล้ว

      the same error from CMD with curl.

  • @DulkithDasunthara
    @DulkithDasunthara 3 ปีที่แล้ว

    Hi, thanks for the video. How to reduce access token lifespan?

  • @akid869
    @akid869 4 ปีที่แล้ว

    i can't run my curl command

  • @ciudaddetlaxcala9895
    @ciudaddetlaxcala9895 3 ปีที่แล้ว

    en postman debe ir la cadena en una solo linea para evitar los caracteres
    y

  • @MohammedFaijan
    @MohammedFaijan ปีที่แล้ว

    how to revoke google token ?

  • @cposadaa
    @cposadaa 4 ปีที่แล้ว

    I am getting this Error 400: invalid_request
    Required parameter is missing: response_type

    • @mSierraEngineer
      @mSierraEngineer 4 ปีที่แล้ว +1

      I discovered that there is an indentation when copying the sample redirect from the google identity platform. Paste it into Sublime or any editor of your choice, and delete the indents. If seems that the indents are hidden when pasting the sample url into the url field on chrome.

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      Mikel Tan Thanks

  • @opensourceautomation-afsarali
    @opensourceautomation-afsarali  4 ปีที่แล้ว

    Please find Github repo for Refresh Token and Access Token Command :
    github.com/afsarali273/GmailAPI/blob/ff5b1f25308155fc87ae79cfff2ed7b5fc62d9b8/Gmail/src/main/java/com/gmail/api/GmailAPI.java#L43
    I would recommend ,first copy command in the notepad then replace your credentials before running in the terminal/cmd

  • @cpapazach
    @cpapazach 4 ปีที่แล้ว

    Many thanks, the documentation is really a mess

  • @boakyebismark4205
    @boakyebismark4205 3 ปีที่แล้ว

    can some one help me { Erreur 403 : access_denied }

  • @natsurangtreeyuttalukkul8014
    @natsurangtreeyuttalukkul8014 4 ปีที่แล้ว

    I don't understand >> time 19.32

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      Hi Natsurang .. In this particular time ..i tried to send an POST API call using POSTMAN tool . but unfortunately it did not worked for me . Hence I tried the same using command line .
      Instead you need to follow from 20:30 (th-cam.com/video/tGDn3V-mIOM/w-d-xo.htmlm30s ) .
      Please watch another video for automated way to create Access Token and Refresh Token
      th-cam.com/video/jhxzhpFanfU/w-d-xo.html
      Please let me. know if you still have any issue.

  • @cgc2300
    @cgc2300 4 หลายเดือนก่อน

    hello

  • @testerqa4729
    @testerqa4729 4 ปีที่แล้ว

    Hi Followed all your steps yet I got {
    "error": "invalid_grant",
    "error_description": "Bad Request"
    }
    Could you please help?

    • @spookyneha7670
      @spookyneha7670 4 ปีที่แล้ว

      I am also getting same error

    • @guddu9713
      @guddu9713 3 ปีที่แล้ว

      This is because the Authorization code invalid..regenerate the auth code

    • @sebastianionel5134
      @sebastianionel5134 3 ปีที่แล้ว

      @@guddu9713 how many fucking times do I need to regenerate that shitty code omg

  • @lolFunny8609
    @lolFunny8609 2 ปีที่แล้ว

    I am super lost.

  • @kevinb1594
    @kevinb1594 4 ปีที่แล้ว

    Where is part 2 hommie?

    • @opensourceautomation-afsarali
      @opensourceautomation-afsarali  4 ปีที่แล้ว

      Thanks Kevin watching this video please subscribe to my channel for more updates..
      Part-2
      th-cam.com/video/IZ1ZEjuJF8U/w-d-xo.html

    • @kevinb1594
      @kevinb1594 4 ปีที่แล้ว

      @@opensourceautomation-afsarali Thanks so much for making this content bro. Subbed.

  • @MrutyunjayDravid
    @MrutyunjayDravid 11 หลายเดือนก่อน

    Error 400: redirect_uri_mismatch