Bluetooth Posted September 2, 2017 Share Posted September 2, 2017 Hello fellow developers... I am having a seriously difficult time trying to get this to work... //OAuth - Here is what I am attempting to use:https://developers.google.com/api-client-library/php/auth/service-accounts //The Service I would like to connect to:https://developers.google.com/beacons/proximity/reference/rest/v1beta1/beaconinfo/getforobserved //What I have so far: <?php session_start(); require_once 'google/vendor/autoload.php'; $client = new Google_Client(); $server_root = str_replace("/public_html", "", $_SERVER['DOCUMENT_ROOT']); putenv('GOOGLE_APPLICATION_CREDENTIALS='.$server_root.'/service-account.json'); $client->useApplicationDefaultCredentials(); $client->setApplicationName("The App"); $client->setScopes(['https://www.googleapis.com/auth/userlocation.beacon.registry']); ?> :/ I am not even sure this even remotely right...however the specific scope said I need to connect to OAuth2 first then call the service... and because it is a dashboard I am trying to create I figured it would be the service to service OAuth that I would need? I am still pretty new to this...so any help would be extremely appreciated,,Thank-YouBryan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.