"Invalid requests[7].insertInlineImage: Access to the provided image was forbidden."

The Problem

I am using the docs api to merge text, links, and images into a templated document. Every once and a while, I encounter this exact bug. I have no idea what causes it, and it seems that just waiting around resolves it. Does anyone know what is going on here?

The Error
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://docs.googleapis.com/v1/documents/1XykUD1dvoLqK3lSK6yJFTlPRyELD8lWeHsEnAqIqtNg:batchUpdate?alt=json returned "Invalid requests[7].insertInlineImage: Access to the provided image was forbidden.". Details: "Invalid requests[7].insertInlineImage: Access to the provided image was forbidden.">
The Request
        {'insertInlineImage': {
            'location': {
                'index': 59
            },

        'uri': f'https://drive.google.com/uc?id={str(event.event_gif_file)}',
        
        'objectSize': {
            'height': {
                'magnitude': 500,
                'unit': 'PT'
            },
            'width': {
                'magnitude': 500,
                'unit': 'PT'
            }
        }}},

Is there some sort of limit to how often I can use this function? I changed nothing, waited, and it started working again.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum