googleapis / google-api-php-client

A PHP client library for accessing Google APIs
Apache License 2.0
9.2k stars 3.52k forks source link

Wallet API error #2557

Open pws2016 opened 5 months ago

pws2016 commented 5 months ago

Hello, i try using the API Wallet and i creqte the API key in console with domain restriction. But the code return me an error: [{"message":"Login Required.","domain":"global","reason":"required","location":"Authorization","locationType":"header"}]

I use the PHP library and i write this code: $client = new Google\Client(); $client->setApplicationName('Wallet Objects App'); $client->setDeveloperKey(GOOGLE_WALLET_API_KEY);

How i can fix this?

Thanks

bshaffer commented 1 week ago

Hello @pws2016 !

The code you've provided looks correct to me - could you provide the rest of your code as well so we can help you debug better?