AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

My Business
3.2K members online now
3.2K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Every once in whild I see this 502 error

[ Edited ]
Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Server error: `POST https://www.googleapis.com/oauth2/v4/token` resulted in a `502 Bad Gateway` response: <meta name=viewport content="initial-scale=1, minimum-scale=1, w (truncated...)

 

My current solution is to retry the post,  anyone else working through this?

1 Expert replyverified_user

Re: Every once in whild I see this 502 error

[ Edited ]
Google Employee
# 2
Google Employee

Hi @Jeremy M,

 

Given the security implications of getting the implementation correct, we strongly encourage you to use client libraries when interacting with Google's OAuth 2.0 endpoints.

 

Thanks,

The Google My Business API team

Every once in whild I see this 502 error

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

I am using Google Client PHP libraries for The My Business Api for interacting with OAuth end points.  However there is not enough detail in the errors returned from post and patches performed with these libraries.  So one I have complete my object creation i post using php curl so I can get full detail on the error messages.

Every once in whild I see this 502 error

Follower ✭ ✭ ☆
# 4
Follower ✭ ✭ ☆

                            [file] => '/var/www/html/dev/lbe.12.22.6/module/Services/src/Services/lib/DirectoryApis/mybusiness/Mybusiness.php'

                            [line] => 875

                            [function] => 'call'

                            [class] => 'Google_Service_Resource'

                            [type] => '->'

                            [args] => array

                            (

                                [0] => 'list'

                                [1] => array

                                (

                                    [0] => array

                                    (

                                        [name] => 'accounts/115574618596707086221'

                                        [filter] => 'name'

                                        [pageSize] => 100

                                    )

                                )

                                [2] => 'Google_Service_Mybusiness_ListLocationsResponse'

                            )

                        )

 

recently receive this error from trying to read a list of locations

Re: Every once in whild I see this 502 error

Google Employee
# 5
Google Employee

Hi @Jeremy M,

 

The PHP client library doesn’t currently support the display of detailed error messages, we suggest you follow the Make a simple HTTP request step-by-step guide on the Google Developers site to learn how to use the OAuth 2.0 Playground for troubleshooting errors with detailed error messages when sending requests with data via the Google My Business API.

 

Thanks,

The Google My Business API team