Open Skywalker1-CZ opened 2 years ago
Edit: with PHP 7.4.30 on the same system - same issue
Oh, now PHP samples/examples have been entirely removed from this repo, and from Google API documentation (ie: the link in the first post no longer works).
Disheartening, to say the least.
Oh, now PHP samples/examples have been entirely removed from this repo, and from Google API documentation (ie: the link in the first post no longer works).
Disheartening, to say the least.
Still available here https://github.com/googleworkspace/php-samples/tree/main/calendar/quickstart
You need to create the credentials.json file via Google Cloud Console
The JSON file has the following fields (redacted for privacy):
{
"installed": {
"client_id": "someid.apps.googleusercontent.com",
"project_id": "your-project-name",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "some-secret",
"redirect_uris": [
"http://localhost"
]
}
}
Hi,
when I trying to use GoogleAPI - via this document https://developers.google.com/calendar/api/quickstart/php - so:
php composer.phar require google/apiclient:^2.0
nano quickstart.php
(insert the one from URL)php quickstart.php
won't do anythingin PHP Error log I only seen this:
So, I think that isn't right, because on official documentation is this text: Step 3: Run the sample
Run the sample using the following command:
php quickstart.php
The first time you run the sample, it prompts you to authorize access:
but how can I activate the API, without browsing the URL from quickstart.php ?
Specifications
php -v
): PHP 8.0.22 (cli) (built: Aug 8 2022 11:02:16) ( NTS )Thanks for reply
Filip