json.GoogleJsonResponseException: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Insufficient Permission", "reason" : "insufficientPermissions" } ], "message" : "Insufficient Permission" } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJs nResponseException.java:146)

  1. 0

    Error when trying to send an email using Gmail API in Java

    Stack Overflow | 4 months ago | Jonas Al-Hadad
    json.GoogleJsonResponseException: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Insufficient Permission", "reason" : "insufficientPermissions" } ], "message" : "Insufficient Permission" } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJs nResponseException.java:146)

    Root Cause Analysis

    1. json.GoogleJsonResponseException

      403 Forbidden { "code" : 403, "errors" : [ { "domain" : "global", "message" : "Insufficient Permission", "reason" : "insufficientPermissions" } ], "message" : "Insufficient Permission" } at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJs nResponseException.java:146)

      at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError()
    2. Google APIs Client Library for Java
      AbstractGoogleClientRequest$1.interceptResponse
      1. com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
      2. com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
      3. com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321)
      3 frames
    3. Google HTTP Client Library for Java
      HttpRequest.execute
      1. com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065)
      1 frame
    4. Google APIs Client Library for Java
      AbstractGoogleClientRequest.execute
      1. com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419)
      2. com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352)
      3. com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469)
      3 frames
    5. org.actuarlib.outsourcing
      Mail.main
      1. org.actuarlib.outsourcing.mail.Mail.sendMessage(Mail.java:78)
      2. org.actuarlib.outsourcing.mail.Mail.main(Mail.java:195)
      2 frames