0

I'm using Google Drive&SpreadSheet API to output my work. The successful example results should be like this: Example

However, my output won't ever show the image. Opening the image link giving me a 403 page.

I've researched Google handle error but 403 includes multiple situations. I have no idea what situation my 403 could be. I've also checked some past question. But mine doesn't even have an error message returned(only with a 403 page). Could anyone lesson me a clue about this problem?

  • Did you make your images publicly accessible? If they are not, you'd have to go through OAuth process in order to retrieve them. Adding the corresponding URL via formula won't be of any use. – Iamblichus Jan 27 '21 at 11:21
  • Thanks for your suggestion. But since I couldn't even see the image with my own google account, could it still be the image publicly accessible problem? I've made the publishing status open under "OAuth consent screen", and gave the photo library API credentials. Those doesn't work :/ – Dream Aerwyna Jan 28 '21 at 10:09
  • `could it still be the image publicly accessible problem` Not sure what you mean. The image has to be publicly accessible (that is, you can access it with your browser while logged into any Google account) if you want it to show up in the Sheet via `=IMAGE(URL)`. – Iamblichus Jan 28 '21 at 10:13

1 Answers1

0

Heading

This problem is solved. There was a bug when I call the google Spread Sheet API. I missed execute() after creating the permission. It should be self.drive.permissions().create(fileId=dir_id, body={"role":"writer", "type": "anyone"}).execute()