Skip to content
Advertisement

GAE PHP 7 403 FORBIDDEN error while got URL to upload file

I got some problem while managing migration from PHP5 to PHP7.

Actually, what I was doing with php5, to get an URL where upload a file, was something like this:

JavaScript

I’ve uploaded the library and now I’m trying to use

GoogleCloudStorageStorageClient

I’ve converted the code above to something like this:

JavaScript

I got a 403 FORBIDDEN error

JavaScript

Some suggestions? In the PHP5 version upload is working (with the older code), so I suppose my app angine service account has the correct permissions setted.

Thanks

Advertisement

Answer

Solved by passing .json file for authentication.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement