PHP Classes
elePHPant
Icontem

using with google API

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  using with google API  >  (Un) Subscribe thread alerts  
Subject:using with google API
Summary:using with google API
Messages:6
Author:moi moi
Date:2019-09-08 22:11:54
 

 


  1. using with google API   Reply   Report abuse  
moi moi - 2019-09-08 22:11:54
Hello.

I have two questions about this API :

first, the test_oauth_client.php file ask for a http.php file i don't find on the zip.

Second, the google example is for connecting someone.
Someone have an exemple for getting a token for using and API (of google) using the json api key ?

Thank you

  2. Re: using with google API   Reply   Report abuse  
moi moi - 2019-09-08 22:13:13 - In reply to message 1 from moi moi
i forget to tell that it is for using this api :
googleapis.com/auth/actions.fulfill ...

i think this is what i have to insert for the scope.

  3. Re: using with google API   Reply   Report abuse  
Manuel Lemos - 2019-09-09 01:08:33 - In reply to message 1 from moi moi
Hello Moi Moi,

The example scripts contain a link in the comments for the HTTP class package that contains the http.php scripts. But you can also find it here:

phpclasses.org/httpclient

The link you passed does not seem to lead to a valid page for me here. Can you pass some other link of a page that leads to the public documentation of that API you want to call so I can understand what you are requesting?

  4. Re: using with google API   Reply   Report abuse  
moi moi - 2019-09-09 05:16:35 - In reply to message 3 from Manuel Lemos
Then you very much

I would be myself so much happy myself if i could find a correct documentation

All i file is a few samples in node.js or java and i don't know these languages.

I send you what i have :
developers.google.com/actions/assis ...
It is the send notification part that i want to do.

jovo.tech/tutorials/google-action-n ...

medium.com/cognigyai/push-notificat ...

I made everything correctly my only problem is the to send the notification.

Thank you

  5. Re: using with google API   Reply   Report abuse  
moi moi - 2019-09-09 05:17:56 - In reply to message 4 from moi moi
All i found is...
Not
all i file is..

  6. Re: using with google API   Reply   Report abuse  
Manuel Lemos - 2019-09-09 21:59:18 - In reply to message 4 from moi moi
I think you need to set the scope of the OAuth permissions to this value:

googleapis.com/auth/actions.fulfill ...

If you are basing your code in the login_with_google.php script that comes with the package, locate a line in that script that says:

$client->scope = 'https://www.googleapis.com/auth/userinfo.email '. 'https://www.googleapis.com/auth/userinfo.profile';

Change it to something like:

$client->scope = 'https://www.googleapis.com/auth/userinfo.email '. 'https://www.googleapis.com/auth/userinfo.profile' . 'https://www.googleapis.com/auth/actions.fulfillment.conversation
';

That should grant your application the permissions to send API calls to send push notification actions.