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

500 Error on accounts.locations.admins.create

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

Hi,

We've been using this endpoint for months and it now gives us 500 errors.

Is there a way to see a more detailed error? I tried X-GOOG-API-FORMAT-VERSION: 2 to no avail.

Thanks for looking into this!

 

Request:

 

 

curl -X POST -H "Authorization: Bearer ***" -H "Content-Type: application/json" -d '{"adminName": "gmb@moz.com", "role": "MANAGER"}' "https://mybusiness.googleapis.com:443/v3/accounts/111397735697354897549/locations/1869065338774047248/admins"

 

 

Response:

 

{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

 

1 Expert replyverified_user

Re: 500 Error on accounts.locations.admins.create

[ Edited ]
Google Employee
# 2
Google Employee

Hi @Kuba H,

 

You should be able to receive detailed error messages in responses without having to add the additional header when using a cURL script to make requests via the Google My Business API. I 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.

 

Please remove the :443 port number from the URI of the POST request for adding an admin to the specified location that you included in your post as shown below:

https://mybusiness.googleapis.com/v3/accounts/111397735697354897549/locations/1869065338774047248/admins

 

Please make sure that you are the owner of the listing for you to be able to add or remove other users. The invitee's email address should be associated with a Google Account. Lastly, check that you haven’t already added this admin with the same email address to the specified location by sending a GET request to list all admins for the specified location.

 

I hope this helps fix your issue. Please let us know if you are continuing to see this 500 Internal Server Error.

 

Thanks,

Terry