Google Ads Api Integration

32 views
Skip to first unread message

shahwar afzal

unread,
Nov 5, 2021, 2:09:52 PM11/5/21
to AdWords API and Google Ads API Forum
  1. How can i do this OAUTH2 process in server side?
    2)By using google api client library. I can do this OAUTH2 process and i can mention the redirect URI. But in google ads we need refresh token. How can i get that?

Google Ads API Forum Advisor

unread,
Nov 8, 2021, 1:56:12 AM11/8/21
to shahwar...@gmail.com, adwor...@googlegroups.com
Hi Shahwar,

Thank you for raising your concern to our team.

Please see my answer below for each question:
1. How can i do this OAUTH2 process in server side?
-Could you confirm if what you are asking is how to set up OAuth2 for API access using web flow? If yes, then you can open this page, expand the section of the client library that you are using, then click the OAuth Web Application Flow document.


2)By using google api client library. I can do this OAUTH2 process and i can mention the redirect URI. But in google ads we need refresh token. How can i get that?
This is the document that you can follow in order to generate refresh token using specific supported client libraries.

Let me know if you have further questions.

Regards,

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2R6ifh:ref

shahwar afzal

unread,
Nov 8, 2021, 8:21:16 AM11/8/21
to AdWords API and Google Ads API Forum
Hi team 
I am using a client library but i am get the bad request error when api hit the post method for google service
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response: { "error": "invalid_grant", "error_description": "Bad Request" 
Please guide me the how to resolve this issue 

image.png

On Fri, Nov 5, 2021 at 11:09 PM shahwar afzal <shahwar...@gmail.com> wrote:
  1. How can i do this OAUTH2 process in server side?
    2)By using google api client library. I can do this OAUTH2 process and i can mention the redirect URI. But in google ads we need refresh token. How can i get that?

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/52f5c236-6d12-4859-8ad3-59072de42288n%40googlegroups.com.

Google Ads API Forum Advisor

unread,
Nov 8, 2021, 2:22:39 PM11/8/21
to shahwar...@gmail.com, adwor...@googlegroups.com

Hello,

Thank you for raising your concern. I understand that you’ve encountered the error 'invalid_grant'.

Can you please try regenerating your OAuth2 credentials along with the refresh token and see if this behavior persists?

Please let us know if you continue to see this issue.



Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Best regards,

Google Logo
Jakeia Sabrina
Google Ads API Team
 

ref:_00D1U1174p._5004Q2R6ifh:ref
Reply all
Reply to author
Forward
0 new messages