0

I'm trying to use this API(https://developers.google.com/admin-sdk/reports/v1/reference/activities/list) to list calendar activities for G Suite users but this error appears:

Exception in thread "main" java.lang.IllegalArgumentException: Parameter applicationName must conform to the pattern (admin)|(docs)|(login)

My Code is:

Reports reports = new Reports.Builder(httpTransport, jsonFactory, credencial).build();

Activities activities = reports.activities()
                        .list("all", "calendar")
                        .setPageToken(nextPageToken)
                        .setMaxResults(10)
                        .execute();

When I use the login option it works for me

can anybody help me?

Thank you.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449

1 Answers1

0

The reports API quickstart for java should help. Reports API Java. You have to ensure that the second param of .list("all",***) conforms to the version you are using. Example .list("all","docs") would return the list of activities for the docs application from all users in your relative domain. Make sense?

RamelHenderson
  • 2,151
  • 2
  • 13
  • 12