Closed marcebil closed 5 years ago
Which PHP quickstart is this for?
It looks like the Drive Activity quickstart.
In the quickstart.php you linked for us I noticed you added an additional scope + some code for Google_Service_Appsactivity and changed the Composer vendor directory path. I was able to get to the OAuth consent screen successfully with your edits except the vendor directory path and my credentials.
Can you confirm you're able to successfully the Drive PHP quickstart as is?
Hey guys Ireally need your help here i'm trying to connnect to google calendar API and all other poccess are working fine the problem start where im trying to enter a verification code from the link i get from the browser, please guys help me...
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with mes sage 'cURL error 60: SSL certificate problem: unable to get local issuer certifi cate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in W:\HawkMobileCE OMeetingsSite\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:186 Stack trace:
.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Han dler\EasyHandle), Array)
.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler \CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\ CurlFactory))
.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlH andler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFa ctory))
zle\src\Handler\CurlFactory.php on line 186
In the quickstart.php you linked for us I noticed you added an additional scope + some code for Google_Service_Appsactivity and changed the Composer vendor directory path. I was able to get to the OAuth consent screen successfully with your edits except the vendor directory path and my credentials.
Can you confirm you're able to successfully the Drive PHP quickstart as is?
Sorry for the delay and thanks to all the people who look at it. I just came back from an obligated rest. Answering to asrivas:
1) I just get again the last version of quickload.php from 'https://developers.google.com/drive/api/v3/quickstart/php'
2) I only change the directory where i installed the composer, modifying the require include directory. And it is loading fine.
3) Then I execute from the command line:
'php quickstart.php'
and get a link to browse to, which is:
"
https://accounts.google.com/o/oauth2/auth?%20response_type=code&access_type=offline&client_id=433334862655-7vdjqv2iaqhe452ekb8ib7t5hc2ujfqg.app%20s.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state&scope=https%20%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.metadata.readonly&prompt=select_account%20%20consent
"
4) I browse to the link
I am suppoused to get a verification code from there, or some OAuth screen, but instead I received
a 400 error cod: "Error: invalid_request Required parameter is missing: response_type"
So, answering your question, i am not being able to get to the OAuth consent screen, as you do. (I had enabled the 'Drive Api' (getting the composer), and synchronized everything)
Any helps will be very welcome!
If it helps I can upload my composer.json file
We can't help if you modify the sample. Please use StackOverflow for generic questions Anu and I both couldn't find the issue you having, and it looks like the sample isn't being run as directed, so I'll close this issue.
If you still are finding an issue with this sample, please be very specific in a new issue.
Perhaps your credentials are incorrect. See issues like this: https://stackoverflow.com/questions/11696526/google-oauth-2-response-type-error-on-token-request
I get credentials.json (attached credentials.zip) and I installed composer. Then I run "composer quickstart.php" provided in the PHP quickstart page (quickstart.php attached) I get this url to execute: (see phpquickstartOutput.jpg file attached)
https://accounts.google.com/o/oauth2/auth?%20response_type=code&access_type=offline&client_id=433334862655-7vdjqv2iaqhe452ekb8ib7t5hc2ujfqg.apps.go%20ogleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state&scope=https%3A%2F%20%2Fwww.googleapis.com%2Fauth%2Factivity%20https%3A%2F%2Fwww.googleapis.com%2Fauth%20%2Fdrive.metadata.readonly&approval_prompt=auto
Expected Behavior
Actual Behavior
(See attached file BrowserError.jpg) I received this error: " Required parameter is missing: response_type response_type=code access_type=offline client_id=433334862655-7vdjqv2iaqhe452ekb8ib7t5hc2ujfqg.apps.go ogleusercontent.com redirect_uri=urn:ietf:wg:oauth:2.0:oob state= scope=https:/ /www.googleapis.com/auth/activity https://www.googleapis.com/auth /drive.metadata.readonly approval_prompt=auto "
Steps to Reproduce the Problem
with the attached composer.json file
Specifications
php -v
): 7.0credentials.zip quickstart.zip