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

500 Error when requesting a location

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi

 

When doing this api request

 

GET https://mybusiness.googleapis.com/v3/accounts/109520262957186680149/locations?access_token=...&pageS...

 

We get a 500 internal server error back, accesstoken works for other request and the account is verified. For other accounts/locations the request works as intended. 

 

/Fredrik

1 Expert replyverified_user

Re: 500 Error when requesting a location

Google Employee
# 2
Google Employee

Hi @Fredrik L,

 

We notice in your HTTP request that you directly add the access_token to the request as a URI query-string parameter when sending the token in the HTTP request. While this works, we don't recommend this method because URI parameters can end up in log files that are not completely secure. Also, it is good REST practice to avoid creating unnecessary URI parameter names.

 

You should send the token to a Google API in an HTTP authorization header. We strongly recommend that you use the Google My Business API Client libraries and Google API Client Libraries when interacting with Google's OAuth 2.0 endpoints to implement a simple and secure application.

 

Can you please provide us with a specific locationId for one of the locations in which you are experiencing this 500 Internal Server Error when listing the locations with a pageSize query parameter? Once we have that information, we can help you troubleshoot the issue further.

 

Thanks,

Terry

Re: 500 Error when requesting a location

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi

The accountid we have problem with is: 109520262957186680149

I tried the request using cUrl with the access token as a http header but that too gives me an internal server error (500)

curl --header "Authorization: Bearer MYTOKEN" https://mybusiness.googleapis.com/v3/accounts/109520262957186680149/locations\?pageSize\=100

Omitting pageSize still gives me the same error.

-Fredrik

Re: 500 Error when requesting a location

Google Employee
# 4
Google Employee

Hi @Fredrik L,

 

The 500 Internal Server Error you received when listing the locations for the specified account was caused by a location that has been marked as a duplicate of a listing which has been deleted.  We will notify you on this thread when this issue has been fixed. Please stay tuned for updates and thank you for your patience!

 

Thanks,

Terry

Marked as Best Answer.
Solution
Accepted by topic author Fredrik L
June 2016

Re: 500 Error when requesting a location

Google Employee
# 5
Google Employee

Hi @Fredrik L,

 

The issue with the 500 Internal Server Error when listing the locations for the specified account caused by duplicate locations has been fixed. Please report back to us if you find any other issues.

 

Cheers,

Terry

Re: 500 Error when requesting a location

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Hi Terry,

i have the same error by getting the list of the locations. In other accounts, everything looks ok. Here is the accountid: 106878314683525369317

Thanks,
Cheers, musti

Re: 500 Error when requesting a location

Google Employee
# 7
Google Employee

Hi @Mustafa K,

 

We are aware of the 500 Internal Server Error you received when listing the locations for the specified account. We will notify you on this thread when this issue has been fixed. Please stay tuned for updates and thanks for your patience!

 

Thanks,

Terry

Re: 500 Error when requesting a location

[ Edited ]
Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Hi Terry,

thanks for the reply! Is there any news about this issue?

 

UPDATE:

We moved some of the locations to another Account, and there i am not getting any error, when i am trying to list the locations. Probably one of the location has a problem that causes the error. I will keep you updated.

 

Cheers, musti

Re: 500 Error when requesting a location

Google Employee
# 9
Google Employee

Hi @Mustafa K,

 

It appears that your given account is full of duplicate locations with the duplicates in a number of other business accounts. The 500 Internal Server Error was caused by the duplicate locations having permission errors with their business accounts.

 

We will update you on this thread when this issue has been resolved. Please stay tuned for updates and thank you for your patience! In the meantime, please read this article for more information on how to resolve the duplicate locations situation.

 

Thanks,

Terry

Re: 500 Error when requesting a location

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭
Hi Terry,

i have fixed that error already by myself. I moved the locations to another new account by 100 groups, at the end one of them just left. The old account which i posted before is ok right now.
The error account is: accounts/106613119462190430661/ this has one location in it. It shows up that it has a duplicate but, if i click "View original location" in the MyBusiness UI, it does not react at all. So this was my problem location. Please check this new account.

BTW: duplicate locations should not be a problem, because we have right access on the other business accounts, our only problem is, after we update the original location with the right storecode, we want to delete the duplicate location that we have created. (anyway inside the duplicate location we have the original location.getMetadata().getDuplicate().getLocationName()) And after that we wanted to delete the duplicate location over the API, but it is not possible at the moment: https://www.en.advertisercommunity.com/t5/Google-My-Business-API/Error-It-can-only-be-deleted-by-del...

Cheers, musti