Installing and using Google's PHP library for OAuth 2 -
in order post/upload stuff local php script (running on machine) (my) gae app, doing this:
https://developers.google.com/api-client-library/php/start/installation
i installed library locally in same folder use uploading php script, using composer. installation works fine, don't understand need able use google_client() class etc in script. "setting include_path dynamically in code" not , steps include library seems missing.
some background info: used able upload/post fine gae app getting "sacsid" cookies, until of these reasons:
- i enabled two-step verification on account used access admin of gae app
- google deprecated "sacsid" process.
i might wrong stuff guess official way these days use said php library right?
specifically tried @ top of script:
require_once 'vendor/autoload.php';
and get
fatal error: class 'google\appengine\api\app_identity\appidentityservice' not found in /vendor/google/apiclient/src/google/auth/appidentity.php on line 79
the class mentioned above defined in appengine php sdk, pulled in automatically when code runs on appengine. authenticates appengine application google apis.
for local development, need authenticate different way. best method using service account credentials. recommend upgrading latest version (v2
) of client library, handled automatically.
Comments
Post a Comment