F
F
Fantazyfa2015-05-26 09:54:55
Google
Fantazyfa, 2015-05-26 09:54:55

How to get permission to download files?

We are setting up a google drive api for our crm system and have run into some problems.
I'll try to describe the problem one by one
1. Created a user admin.google.com
2. Created a service account - general credentials
3. Made authorization successful.
4. Uploaded files - everything works.
The problem is that there are no rights to download these files.
Tried using 2 methods to download files:
a) $downloadUrl = $file->getWebContentLink(); - error 403 - no rights
b) $downloadUrl = $file->getDownloadUrl(); return $httpRequest->getResponseBody(); - returns the content of files.
I read in google that you need to give permissions for the client id, and I did it ...
What could be the problem?
ae5d037586f44853b08d2b56bb498038.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question