Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

php - Google Glass Development Error: (403) Access Not Configured. Please use Google Developers Console to activate the API for your project

I am using the PHP version of the Google Glass Developer Kit. Setup everything per the sample code instructions. API/credentials are all fine, account billing is setup, have added the Mirror API to the project, but after I permission the application, I get the following Error:

An error ocurred: Error calling POST 
https://www.googleapis.com/mirror/v1/timeline?key=xxxxxx 
(403) Access Not Configured. 
Please use Google Developers Console to activate the API for your project.

I have added the Mirror API and have Billing active and setup so have no idea why i am getting the error message. Testing the app via the Glass Explorer works just fine.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Google APIs have been known to misbehave when you provide both OAuth2 credentials and an API Key. Also since you have to use OAuth2 to access the Mirror API, the key=xxxxx isn't necessary anyway.

If you are using the Google APIs Client Library for PHP you can simply remove the following line from your code:

 $client->setDeveloperKey($key);

Not entirely sure if this causes your issue, but I have come across similar issues in other Google APIs.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...