I have essentially been using this code to load an image into Google Drive and then transferring that image over to Google Slides using Python and for some reason it stopped working today.
The code I based mine off of is located here: http://wescpy.blogspot.com/2016/11/using-google-slides-api-with-python.html
However, today I reran it and am getting an error:
googleapiclient.errors.HttpError: https://slides.googleapis.com/v1/presentations/PRESENTATION_ID returned "Invalid requests[0].createImage: Access to the provided image was forbidden.">
I am wondering if anything have changed in Google API?
Are you getting the same error today 2020/3/6?
<HttpError 400 when requesting https://slides.googleapis.com/v1/presentations/6-7HI:batchUpdate?fields=&alt=json returned "Invalid requests[24].createImage: Access to the provided image was forbidden.">
The error happens every time I am trying to push any image stored in Google Slides using either createImage or replaceAllShapesWithImage.
Note that the URLs pointing at Google Drive content are related to Public content. Thus, the workaround above mentioned by @miladio is not useful at this time.
Error again occuring @ 2020-05-17:
Before this moment it has been working flawlessly with the update to add image to drive -> open permission -> copy it over from drive to slide -> close permissions.
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://slides.googleapis.com/v1/presentations/<SLIDE_ID>?alt=json returned "Invalid requests[152].createImage: Access to the provided image was forbidden.">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With