0

I am new to Google Slides API.

I followed the steps in their QuickStart example at https://developers.google.com/slides/quickstart/java and that runs fine.

I am now trying to create a presentation by following the steps at https://developers.google.com/slides/how-tos/presentations and getting the following error when running the code.

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "global",
    "message" : "Request had insufficient authentication scopes.",
    "reason" : "forbidden"
  } ],
  "message" : "Request had insufficient authentication scopes.",
  "status" : "PERMISSION_DENIED"
}
    at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:146)
    at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
    at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
    at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)

This occurs when I try to create the presentation. Any ideas how to resolve this?

All the best

Patrick

Paddynski
  • 11
  • 2

1 Answers1

0

Notice this part of the documentation.

You can also create a blank presentation using the Google Drive API Files.create method, specifying application/vnd.google-apps.presentation as the mimeType. You'll need an appropriate Drive API scope to authorize this call. You'll need an appropriate Drive API scope to authorize this call.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65