Skip to content Skip to sidebar Skip to footer

Cannot Find DriveId. Are You Authorized To View This File? Android Google Drive Integration

I am using the below code from github, but it shows the following error: toast that Cannot find DriveId. Are you authorized to view this file? I don't know what is the reason behi

Solution 1:

As the message states, your app need to be authorized to view the particular file in order to edit it since your app has Drive.File scope access.

You can get authorized to access the particular file by having the user select in the open file dialog, or by virtue of having created the file.


Solution 2:

May be you are confusing ResourceId with DriveId. Try to use ResourceId for EXISTING_FOLDER_ID or EXISTING_FILE_ID.

You can get it using

driveId.getResourceId().toString()

Solution 3:

I believe this is may be related to our discussion here. If yes, I would recommend you close it there, since the audience here is much broader. Please refer to the github code here to handle your READ/ WRITE string issue. The other issue is related to authorization. If you're on WIN7/Eclipse, this may help. The same info is here as well. In general, don't expect much help, the API is quite new and a bit of a moving target.


Solution 4:

The problem is you are using driveId for access file or folder. which is wrong. you should use resourceid of that driveid like below:

BaseDemoActivity.EXISTING_FOLDER_ID = driveId.getResourceId().toString();

change EXISTING_FOLDER_ID from static to non-static. and use that id for further use.


Post a Comment for "Cannot Find DriveId. Are You Authorized To View This File? Android Google Drive Integration"