Exception in thread "main" com.adobe.granite.analytics.client.ApiException: invalid_client (The client credentials are invalid)
at com.adobe.granite.analytics.client.ConnectionUtil.readResponse(ConnectionUtil.java:25)
at com.adobe.granite.analytics.client.auth.OAuthenticator.getToken(OAuthenticator.java:63)
at com.adobe.granite.analytics.client.auth.OAuthenticator.authenticate(OAuthenticator.java:44)
at com.adobe.granite.analytics.client.AnalyticsClient.callMethod(AnalyticsClient.java:43)
at com.adobe.granite.analytics.client.AnalyticsClient.callMethod(AnalyticsClient.java:31)
at com.adobe.granite.analytics.client.methods.ReportSuiteMethods.getReportSuites(ReportSuiteMethods.java:34)
at test.AdobeDriver.main(AdobeDriver.java:41)
Hi,
I am trying to use this library and I am having problems to use the OAuth authentication.
My code is:
Pretty much as in the README: https://github.com/Adobe-Marketing-Cloud/analytics-java-library/blob/master/README.md#L176-L179
But it fails with:
I get the CLIENT_ID and the SECRET_ID from https://console.adobe.io/integrations/XXXXX/YYYYY/overview (
XXXXX
andYYYYY
are numbers).What could be the problem ? Is it that this library still uses the 1.4 APIs - https://github.com/Adobe-Marketing-Cloud/analytics-java-library/blob/6f4a9b6900b7555d2a32ba3394e156b956d9d3d5/src/main/java/com/adobe/granite/analytics/client/AnalyticsClient.java#L48 ?
Should I follow the JWT approach (https://github.com/AdobeDocs/analytics-2.0-apis/tree/master/examples/jwt/java) ?