Google Directory API with PHP Client Library gives 403 -


i have gone on several questions in regards directory api , php client lib none helped. closest 1 one: google apps admin sdk directory api 403 in php problem still persists.

i cannot access directory api (admin sdk) using php client library.

i can access email settings api.

they both related admin sdk, not understand why when access email settings api token, when try access directory api 403 "requested client not authorized."

the code is

    $scopes = array('https://www.googleapis.com/auth/admin.directory.user', 'https://apps-apis.google.com/a/feeds/emailsettings/2.0/');     $auth = new google_auth_assertioncredentials(g_client_email, $scopes,file_get_contents (g_client_key_path),                     'notasecret',                     'http://oauth.net/grant_type/jwt/1.0/bearer',                     'my.superadmin@account.com', false         ); 

what missing?

also: how heck use logging/debugging class in php client lib? see abstract class not figure out how use it. in end placed own print statements in curl.php inspect going on.

i found error, thought of deleting question out of shame, might else save few hours.

basically in project console, there 2 client ids, native app id , service account id.

when extended projects scope, used wrong client id in domain control panel. though checked on , on again, not saw until preparing document google support. when copied , pasted placed in control panel bellow saw in project console, saw first set of digits matched.

wooops.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -