perl - Net::Google::DataAPI::Auth::OAuth2 failed oauth call access token: received error: 400 Bad Request -
i following solution in here: net::google::authsub login failed new google drive version
however, @ line:
my $token = $oauth2->get_access_token($code) or die;
i getting error below:
failed oauth call access token: received error: 400 bad request { "error" : "invalid_request" }
what issue? in net::google::dataapi::auth::oauth2 need fix? using strawberry perl in windows.
edit: below code:
my $oauth2 = net::google::dataapi::auth::oauth2->new( client_id => 'xxxxxxx.apps.googleusercontent.com', client_secret => 'xxxxxxxx', scope => ['http://spreadsheets.google.com/feeds/'], ); $url = $oauth2->authorize_url(); print "oauth url, code: $url\n"; use term::prompt; $code = prompt('x', 'paste code: ', '', ''); $token = $oauth2->get_access_token($code) or die;
when this, codes start 4/ , end mwi#. maybe you're missing last # character?
Comments
Post a Comment