PHP Classes

using with google API

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement a PH...  >  All threads  >  using with google API  >  (Un) Subscribe thread alerts  
Subject:using with google API
Summary:using with google API
Messages:12
Author:moi moi
Date:2019-09-08 22:11:54
 
  1 - 10   11 - 12  

  1. using with google API   Reply   Report abuse  
Picture of moi moi 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  
Picture of moi moi 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  
Picture of Manuel Lemos 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  
Picture of moi moi 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  
Picture of moi moi 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  
Picture of Manuel Lemos 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.

  7. Re: using with google API   Reply   Report abuse  
Picture of moi moi moi moi - 2019-10-23 23:37:57 - In reply to message 6 from Manuel Lemos
Hello

Sorry to ask you a question again.

After much research i have discovered that i need to do that to access to my api :
github.com/googleapis/google-auth-l ...

when i use there example i have an error. Then i wanted to try with your class.

But i didn't find how to do that using your class with the json private key.

Is it possible ?

Thank you ?

  8. Re: using with google API   Reply   Report abuse  
Picture of moi moi moi moi - 2019-10-27 21:20:39 - In reply to message 7 from moi moi
I just checked again the link i gives you in my last answer.

It won't help neither. It does not give any access token.

I am completely lost...

  9. Re: using with google API   Reply   Report abuse  
Picture of moi moi moi moi - 2019-10-27 21:26:54 - In reply to message 8 from moi moi
Sorry for these messages but it seem that we can not update messages here.

It seem that your api is only if i need to connect to someone's Google (or other provider account) accoynt information (for example someones gmail with he's authorization) I am right?

I don't need that.
I just need to send rest api commands to a google api.

I need to do this :
developers.google.com/assistant/eng ...

And i don't understand how to do that with your class.

Is it possible?

Thank you

  10. Re: using with google API   Reply   Report abuse  
Picture of moi moi moi moi - 2019-10-27 21:51:01 - In reply to message 9 from moi moi
This seem more like what i need.

developers.google.com/identity/prot ...

Is it possible with your api?

Thank you

And sorry for all my messages

 
  1 - 10   11 - 12