Bo.
Bo.

Reputation: 675

Apache Nifi: use OAuth 2.0 to Access Google Analytics APIs

I try to use OAuth 2.0 to Access Google APIs (Google Analytics API v4) in Apache Nifi. I using Service Account basing on this document: https://developers.google.com/identity/protocols/OAuth2ServiceAccount

There is one specific moment if using OAuth 2.0 for Service Account (Google API): These service-account scenarios require creating and cryptographically signing JSON Web Tokens (JWTs). The best example of OAuth access will be using NiFi + JWT:

  1. Create a JWT
  2. Request an access token from the Google OAuth 2.0 Authorization Server
  3. Handle the JSON response from Authorization Server

Point 1 (about JWT) is most interesting.

Are there any examples of already implemented flows exactly For Google Analytics?

Thanks

Upvotes: 4

Views: 7210

Answers (1)

Andy
Andy

Reputation: 14194

I don't know of any specifically for Google Analytics, but there are plenty of examples of OAuth 1.0/2.0 access using Apache NiFi. In general, you will use the InvokeHTTP processor to perform GET/POST/etc. HTTP operations against the remote endpoint.

Without specifying an issue you are encountering, I would suggest you read these articles:

Upvotes: 2

Related Questions