How to get google oAuth2.0 access token using curl command?How to send a header using a HTTP request through a curl call?How do I get a YouTube video thumbnail from the YouTube API?How do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?curl php cannot get access token from google. Curl returns nothing400 Bad Request when sending http post request to get token from auth code?authorization google drive curl (language c)Google OAuth token exchange returns invalid_codeGoogle API oAuth2.0 — Consumer is not registeredSpotify API - error retrieving access token during authorization processNot getting Access token using retrofit2 in android client

Terence Tao–type books in other fields?

Inadvertently nuked my disk permission structure - why?

A planet illuminated by a black hole?

How can I create a pattern of parallel lines that are increasing in distance in Photoshop / Illustrator?

Trapped in an ocean Temple in Minecraft?

What do I do when a student working in my lab "ghosts" me?

Binomial analogue of Riemann sum for definite integral

Request for a Latin phrase as motto "God is highest/supreme"

Print sums of all subsets

TSA asking to see cell phone

How can I stop myself from micromanaging other PCs' actions?

Can the 2019 UA Artificer's Returning Weapon and Radiant Weapon infusions stack on the same weapon?

What is the meaning of "you has the wind of me"?

Singapore to Sydney to Canberra: where do we clear customs

Why did Saturn V not head straight to the moon?

Drillers for petroleum strike gusher of blood

What is a Waiting Word™?

Does the Intel 8086 CPU have user mode and kernel mode?

Are there any examples of technologies have been lost over time?

How do I run a game when my PCs have different approaches to combat?

Strange Cron Job takes up 100% of CPU Ubuntu 18 LTS Server

What self-defense weapons are legal in London?

401(k) investment after being fired. Do I own it?

How do professional electronic musicians/sound engineers combat listening fatigue?



How to get google oAuth2.0 access token using curl command?


How to send a header using a HTTP request through a curl call?How do I get a YouTube video thumbnail from the YouTube API?How do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?curl php cannot get access token from google. Curl returns nothing400 Bad Request when sending http post request to get token from auth code?authorization google drive curl (language c)Google OAuth token exchange returns invalid_codeGoogle API oAuth2.0 — Consumer is not registeredSpotify API - error retrieving access token during authorization processNot getting Access token using retrofit2 in android client






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I was experimenting the google's REST apis. Here, I was trying to generate the access token from cURL command to use that in further REST request.
But I was facing the below errors.



I was trying to get the access token tru the below cURL command but i getting below error responses.



curl 
--request POST
--data "code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU&client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com&client_secret=Sn3giYFFPMCNteKC--938xsP&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code"
https://accounts.google.com/o/oauth2/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



Then I have edited the command as below but it fails.



curl -d client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com -d client_secret=Sn3giYFFPMCNteKC--938xsP -d grant_type=authorization_code -d redirect_uri=urn:ietf:wg:oauth:2.0:oob -d code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU https://oauth2.googleapis.com/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



So, based on this link https://gist.github.com/LindaLawton/cff75182aac5fa42930a09f58b63a309#file-googleauthenticationcurl-sh I have changed the grant_type=client_credentials. But again I got the error response.




"error": "unsupported_grant_type",
"error_description": "Invalid grant_type: client_credentials"



So, Please help me to resolve the error.










share|improve this question






















  • Where did you get the value for the code param? Are you sure you have correctly escaped all meta characters? Add -v to your curl and check that what is being sent is what you think is being sent. Go to developers.google.com/oauthplayground and step through the auth flow. Compare what is being sent by the playground with what you are sending.

    – pinoyyid
    Mar 26 at 19:35












  • I got the code from the link and copied the code from the webpage and added to the curl command. accounts.google.com/o/oauth2/… I have added -v to curl command, but not helpful.

    – KIRUBAKARAN S
    Mar 27 at 6:20












  • paste the output from the curl -v

    – pinoyyid
    Mar 27 at 8:43











  • Hi, please find the curl -v log here drive.google.com/open?id=1qE0AUbX2yqNXz6GyQxYNT_OcS1RnQzXd

    – KIRUBAKARAN S
    Mar 27 at 9:35

















0















I was experimenting the google's REST apis. Here, I was trying to generate the access token from cURL command to use that in further REST request.
But I was facing the below errors.



I was trying to get the access token tru the below cURL command but i getting below error responses.



curl 
--request POST
--data "code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU&client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com&client_secret=Sn3giYFFPMCNteKC--938xsP&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code"
https://accounts.google.com/o/oauth2/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



Then I have edited the command as below but it fails.



curl -d client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com -d client_secret=Sn3giYFFPMCNteKC--938xsP -d grant_type=authorization_code -d redirect_uri=urn:ietf:wg:oauth:2.0:oob -d code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU https://oauth2.googleapis.com/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



So, based on this link https://gist.github.com/LindaLawton/cff75182aac5fa42930a09f58b63a309#file-googleauthenticationcurl-sh I have changed the grant_type=client_credentials. But again I got the error response.




"error": "unsupported_grant_type",
"error_description": "Invalid grant_type: client_credentials"



So, Please help me to resolve the error.










share|improve this question






















  • Where did you get the value for the code param? Are you sure you have correctly escaped all meta characters? Add -v to your curl and check that what is being sent is what you think is being sent. Go to developers.google.com/oauthplayground and step through the auth flow. Compare what is being sent by the playground with what you are sending.

    – pinoyyid
    Mar 26 at 19:35












  • I got the code from the link and copied the code from the webpage and added to the curl command. accounts.google.com/o/oauth2/… I have added -v to curl command, but not helpful.

    – KIRUBAKARAN S
    Mar 27 at 6:20












  • paste the output from the curl -v

    – pinoyyid
    Mar 27 at 8:43











  • Hi, please find the curl -v log here drive.google.com/open?id=1qE0AUbX2yqNXz6GyQxYNT_OcS1RnQzXd

    – KIRUBAKARAN S
    Mar 27 at 9:35













0












0








0








I was experimenting the google's REST apis. Here, I was trying to generate the access token from cURL command to use that in further REST request.
But I was facing the below errors.



I was trying to get the access token tru the below cURL command but i getting below error responses.



curl 
--request POST
--data "code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU&client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com&client_secret=Sn3giYFFPMCNteKC--938xsP&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code"
https://accounts.google.com/o/oauth2/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



Then I have edited the command as below but it fails.



curl -d client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com -d client_secret=Sn3giYFFPMCNteKC--938xsP -d grant_type=authorization_code -d redirect_uri=urn:ietf:wg:oauth:2.0:oob -d code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU https://oauth2.googleapis.com/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



So, based on this link https://gist.github.com/LindaLawton/cff75182aac5fa42930a09f58b63a309#file-googleauthenticationcurl-sh I have changed the grant_type=client_credentials. But again I got the error response.




"error": "unsupported_grant_type",
"error_description": "Invalid grant_type: client_credentials"



So, Please help me to resolve the error.










share|improve this question














I was experimenting the google's REST apis. Here, I was trying to generate the access token from cURL command to use that in further REST request.
But I was facing the below errors.



I was trying to get the access token tru the below cURL command but i getting below error responses.



curl 
--request POST
--data "code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU&client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com&client_secret=Sn3giYFFPMCNteKC--938xsP&redirect_uri=urn:ietf:wg:oauth:2.0:oob&grant_type=authorization_code"
https://accounts.google.com/o/oauth2/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



Then I have edited the command as below but it fails.



curl -d client_id=954040553015-bphgid2596t65i91827omteq778cp7gj.apps.googleusercontent.com -d client_secret=Sn3giYFFPMCNteKC--938xsP -d grant_type=authorization_code -d redirect_uri=urn:ietf:wg:oauth:2.0:oob -d code=4/GQEg70zaxHAuRhhd6A1RB_6LIxwwBV8ak5xRP-nZIBTjuvt4g3fTWyU https://oauth2.googleapis.com/token


Response:




"error": "invalid_grant",
"error_description": "Bad Request"



So, based on this link https://gist.github.com/LindaLawton/cff75182aac5fa42930a09f58b63a309#file-googleauthenticationcurl-sh I have changed the grant_type=client_credentials. But again I got the error response.




"error": "unsupported_grant_type",
"error_description": "Invalid grant_type: client_credentials"



So, Please help me to resolve the error.







android curl oauth-2.0 google-drive-api google-oauth






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 17:32









KIRUBAKARAN SKIRUBAKARAN S

287 bronze badges




287 bronze badges












  • Where did you get the value for the code param? Are you sure you have correctly escaped all meta characters? Add -v to your curl and check that what is being sent is what you think is being sent. Go to developers.google.com/oauthplayground and step through the auth flow. Compare what is being sent by the playground with what you are sending.

    – pinoyyid
    Mar 26 at 19:35












  • I got the code from the link and copied the code from the webpage and added to the curl command. accounts.google.com/o/oauth2/… I have added -v to curl command, but not helpful.

    – KIRUBAKARAN S
    Mar 27 at 6:20












  • paste the output from the curl -v

    – pinoyyid
    Mar 27 at 8:43











  • Hi, please find the curl -v log here drive.google.com/open?id=1qE0AUbX2yqNXz6GyQxYNT_OcS1RnQzXd

    – KIRUBAKARAN S
    Mar 27 at 9:35

















  • Where did you get the value for the code param? Are you sure you have correctly escaped all meta characters? Add -v to your curl and check that what is being sent is what you think is being sent. Go to developers.google.com/oauthplayground and step through the auth flow. Compare what is being sent by the playground with what you are sending.

    – pinoyyid
    Mar 26 at 19:35












  • I got the code from the link and copied the code from the webpage and added to the curl command. accounts.google.com/o/oauth2/… I have added -v to curl command, but not helpful.

    – KIRUBAKARAN S
    Mar 27 at 6:20












  • paste the output from the curl -v

    – pinoyyid
    Mar 27 at 8:43











  • Hi, please find the curl -v log here drive.google.com/open?id=1qE0AUbX2yqNXz6GyQxYNT_OcS1RnQzXd

    – KIRUBAKARAN S
    Mar 27 at 9:35
















Where did you get the value for the code param? Are you sure you have correctly escaped all meta characters? Add -v to your curl and check that what is being sent is what you think is being sent. Go to developers.google.com/oauthplayground and step through the auth flow. Compare what is being sent by the playground with what you are sending.

– pinoyyid
Mar 26 at 19:35






Where did you get the value for the code param? Are you sure you have correctly escaped all meta characters? Add -v to your curl and check that what is being sent is what you think is being sent. Go to developers.google.com/oauthplayground and step through the auth flow. Compare what is being sent by the playground with what you are sending.

– pinoyyid
Mar 26 at 19:35














I got the code from the link and copied the code from the webpage and added to the curl command. accounts.google.com/o/oauth2/… I have added -v to curl command, but not helpful.

– KIRUBAKARAN S
Mar 27 at 6:20






I got the code from the link and copied the code from the webpage and added to the curl command. accounts.google.com/o/oauth2/… I have added -v to curl command, but not helpful.

– KIRUBAKARAN S
Mar 27 at 6:20














paste the output from the curl -v

– pinoyyid
Mar 27 at 8:43





paste the output from the curl -v

– pinoyyid
Mar 27 at 8:43













Hi, please find the curl -v log here drive.google.com/open?id=1qE0AUbX2yqNXz6GyQxYNT_OcS1RnQzXd

– KIRUBAKARAN S
Mar 27 at 9:35





Hi, please find the curl -v log here drive.google.com/open?id=1qE0AUbX2yqNXz6GyQxYNT_OcS1RnQzXd

– KIRUBAKARAN S
Mar 27 at 9:35












2 Answers
2






active

oldest

votes


















1














So the answer was in the question. "Invalid grant_type: client_credentials" whereas the grant type should be authorization_code



My advice for you was to go to the OAuth playground and compare what it sends with what you are sending. Here is a paste from the playground...



POST /oauth2/v4/token HTTP/1.1
Host: www.googleapis.com
Content-length: 277
content-type: application/x-www-form-urlencoded
user-agent: google-oauth-playground
code=4%2FGgFtOcUM73dTMJNpE7XR7w082MrYH-LCm7zMylg31ESKrwmpyQXnzOM
&redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground
&client_id=407408718192.apps.googleusercontent.com
&client_secret=************
&scope=
&grant_type=authorization_code





share|improve this answer






























    0














    don't use urn:ietf:wg:oauth:2.0:oob



    nor use https://developers.google.com/oauthplayground



    but use http://localhost ...



    or any web-server, which rewrites the post-back to a local host-name.



    unless processing that post-back, the cURL request by itself is useless.



    while this question does not even disclose if this is on-line or behind NAT.



    for server to server oAuth2 flow, you need an on-line host & credentials for a service-account.






    share|improve this answer

























    • Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

      – KIRUBAKARAN S
      Mar 27 at 14:33











    • @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

      – Martin Zeitler
      Mar 27 at 14:41














    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55363098%2fhow-to-get-google-oauth2-0-access-token-using-curl-command%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    So the answer was in the question. "Invalid grant_type: client_credentials" whereas the grant type should be authorization_code



    My advice for you was to go to the OAuth playground and compare what it sends with what you are sending. Here is a paste from the playground...



    POST /oauth2/v4/token HTTP/1.1
    Host: www.googleapis.com
    Content-length: 277
    content-type: application/x-www-form-urlencoded
    user-agent: google-oauth-playground
    code=4%2FGgFtOcUM73dTMJNpE7XR7w082MrYH-LCm7zMylg31ESKrwmpyQXnzOM
    &redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground
    &client_id=407408718192.apps.googleusercontent.com
    &client_secret=************
    &scope=
    &grant_type=authorization_code





    share|improve this answer



























      1














      So the answer was in the question. "Invalid grant_type: client_credentials" whereas the grant type should be authorization_code



      My advice for you was to go to the OAuth playground and compare what it sends with what you are sending. Here is a paste from the playground...



      POST /oauth2/v4/token HTTP/1.1
      Host: www.googleapis.com
      Content-length: 277
      content-type: application/x-www-form-urlencoded
      user-agent: google-oauth-playground
      code=4%2FGgFtOcUM73dTMJNpE7XR7w082MrYH-LCm7zMylg31ESKrwmpyQXnzOM
      &redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground
      &client_id=407408718192.apps.googleusercontent.com
      &client_secret=************
      &scope=
      &grant_type=authorization_code





      share|improve this answer

























        1












        1








        1







        So the answer was in the question. "Invalid grant_type: client_credentials" whereas the grant type should be authorization_code



        My advice for you was to go to the OAuth playground and compare what it sends with what you are sending. Here is a paste from the playground...



        POST /oauth2/v4/token HTTP/1.1
        Host: www.googleapis.com
        Content-length: 277
        content-type: application/x-www-form-urlencoded
        user-agent: google-oauth-playground
        code=4%2FGgFtOcUM73dTMJNpE7XR7w082MrYH-LCm7zMylg31ESKrwmpyQXnzOM
        &redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground
        &client_id=407408718192.apps.googleusercontent.com
        &client_secret=************
        &scope=
        &grant_type=authorization_code





        share|improve this answer













        So the answer was in the question. "Invalid grant_type: client_credentials" whereas the grant type should be authorization_code



        My advice for you was to go to the OAuth playground and compare what it sends with what you are sending. Here is a paste from the playground...



        POST /oauth2/v4/token HTTP/1.1
        Host: www.googleapis.com
        Content-length: 277
        content-type: application/x-www-form-urlencoded
        user-agent: google-oauth-playground
        code=4%2FGgFtOcUM73dTMJNpE7XR7w082MrYH-LCm7zMylg31ESKrwmpyQXnzOM
        &redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground
        &client_id=407408718192.apps.googleusercontent.com
        &client_secret=************
        &scope=
        &grant_type=authorization_code






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 12:35









        pinoyyidpinoyyid

        14.6k9 gold badges37 silver badges87 bronze badges




        14.6k9 gold badges37 silver badges87 bronze badges























            0














            don't use urn:ietf:wg:oauth:2.0:oob



            nor use https://developers.google.com/oauthplayground



            but use http://localhost ...



            or any web-server, which rewrites the post-back to a local host-name.



            unless processing that post-back, the cURL request by itself is useless.



            while this question does not even disclose if this is on-line or behind NAT.



            for server to server oAuth2 flow, you need an on-line host & credentials for a service-account.






            share|improve this answer

























            • Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

              – KIRUBAKARAN S
              Mar 27 at 14:33











            • @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

              – Martin Zeitler
              Mar 27 at 14:41
















            0














            don't use urn:ietf:wg:oauth:2.0:oob



            nor use https://developers.google.com/oauthplayground



            but use http://localhost ...



            or any web-server, which rewrites the post-back to a local host-name.



            unless processing that post-back, the cURL request by itself is useless.



            while this question does not even disclose if this is on-line or behind NAT.



            for server to server oAuth2 flow, you need an on-line host & credentials for a service-account.






            share|improve this answer

























            • Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

              – KIRUBAKARAN S
              Mar 27 at 14:33











            • @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

              – Martin Zeitler
              Mar 27 at 14:41














            0












            0








            0







            don't use urn:ietf:wg:oauth:2.0:oob



            nor use https://developers.google.com/oauthplayground



            but use http://localhost ...



            or any web-server, which rewrites the post-back to a local host-name.



            unless processing that post-back, the cURL request by itself is useless.



            while this question does not even disclose if this is on-line or behind NAT.



            for server to server oAuth2 flow, you need an on-line host & credentials for a service-account.






            share|improve this answer















            don't use urn:ietf:wg:oauth:2.0:oob



            nor use https://developers.google.com/oauthplayground



            but use http://localhost ...



            or any web-server, which rewrites the post-back to a local host-name.



            unless processing that post-back, the cURL request by itself is useless.



            while this question does not even disclose if this is on-line or behind NAT.



            for server to server oAuth2 flow, you need an on-line host & credentials for a service-account.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 27 at 14:00

























            answered Mar 27 at 13:53









            Martin ZeitlerMartin Zeitler

            23.9k5 gold badges51 silver badges88 bronze badges




            23.9k5 gold badges51 silver badges88 bronze badges












            • Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

              – KIRUBAKARAN S
              Mar 27 at 14:33











            • @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

              – Martin Zeitler
              Mar 27 at 14:41


















            • Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

              – KIRUBAKARAN S
              Mar 27 at 14:33











            • @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

              – Martin Zeitler
              Mar 27 at 14:41

















            Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

            – KIRUBAKARAN S
            Mar 27 at 14:33





            Actually, I was experimenting through the shell script, so I had no chance to use in google's oAuth playground. Also, I have not configured any web server locally.

            – KIRUBAKARAN S
            Mar 27 at 14:33













            @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

            – Martin Zeitler
            Mar 27 at 14:41






            @KIRUBAKARANS without that, you might be out of luck, because the postback will be lost. it works about like this (which also counts for an oAuth2-flow initiated by shell script): oauth.com/oauth2-servers/server-side-apps ...custom local host-names or ports require an on-line web-server, else it will fail to resolve DNS.

            – Martin Zeitler
            Mar 27 at 14:41


















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55363098%2fhow-to-get-google-oauth2-0-access-token-using-curl-command%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해