Search code examples
phpgoogle-slides-api

Google Slides API invalid presentations id


I'm trying to create some slides with the Slides API but I started getting this error Invalid presentation.presentationId: The id is invalid.

I tried to create it through the API reference without success as shown in the image:

Reference request and error image

Is there any limitation on the presentationId or some other required fields I should pass?

This is the exception I get:

{
    "error": {
    "code": 400,
    "message": "Invalid presentation.presentationId: The id is
 invalid.",
    "errors": [
        {
            "message": "Invalid presentation.presentationId: The id is invalid.",
            "domain": "global",
            "reason": "badRequest"
        }
    ],
    "status": "INVALID_ARGUMENT"
    }
}

Solution

  • You want to create new Slide using Method: presentations.create. If my understanding is correct, how about this?

    In your case, please try it using the request body with title and without presentationId as follows.

    enter image description here

    Note :

    • At this request body, a new Slide with the filename of "Teste123" is created to the root.

    Reference :

    If I misunderstand your question, I'm sorry.