verificationTokens.generate method for Google Business Profiles throws 404

77 views Asked by At

Calling POST method on https://mybusinessverifications.googleapis.com/v1/verificationTokens:generate with correct Location object in request body gets me:

Client error:
POST https://mybusinessverifications.googleapis.com/v1/verificationTokens:generate
resulted in a 404 Not Found response: 
<!DOCTYPE html> 
<html lang=en> <meta charset=utf-8> <meta name=viewport content="initial-scale=1, minimum-scale=1, w (truncated...)

This URL is correct per: https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate

Code (just repeating other requests that work with a different endpoint):

$account = $this->getAccounts('XXXX');
$filter = [];
$filter['store_code'] = 'YYY';
$locations = $this->getLocations($account, $filter);
$location=$locations[0];
$response = $client->authorize()->post('https://mybusinessverifications.googleapis.com/v1/verificationTokens:generate', ['location' => $location]);
dd($response);

Only errors listed in the docs are: Throws PERMISSION_DENIED if the caller is not a vetted partner account. Throws FAILED_PRECONDITION if the caller's VettedStatus is INVALID.

What's going on? Anybody with some experience using this endpoint?

2

There are 2 answers

0
dusoft On BEST ANSWER

Information from Google Business Profiles Support:

I have confirmed with our internal team that this method has been removed.

Sincerely, Shalini

The Google Business Profile API team

0
vpgcloud On

Since the reference seemingly has become unavailable (https://developers.google.com/my-business/reference/verifications/rest/v1/verificationTokens/generate), it's possible it was public by mistake and should only have been available to certain vetted partners that were given extended access to the reference in the first place. If you are a vetted partner, reaching out to your partner manager or the GBP API support might help to get access to the reference and yield responses from the API.