Created 07-22-2016 11:56 PM
I am looking to pull data from salesforce objects, logs using GetHTTP Processor. I need help with configuring processor for OAuth 2.0 parameters.
Created 07-25-2016 08:05 AM
Hi @Mehul Ramani,
You may be interested by this thread:
On this mailing list, @Jeremy Dyer has posted an example to access Salesforce with OAuth 2.0. I enclosed it to this answer: salesforce-oauth2-login-example.xml
I've also posted a blog regarding OAuth here:
https://pierrevillard.com/2016/04/12/oauth-1-0a-with-apache-nifi-twitter-api-example/
Created 07-23-2016 01:33 AM
Since you want to make the call from GetHTTP NiFi processor, to be able to make a https call you need to setup 'SSL Context Service' . Summarily, you will need to configure the truststore properties with for your SSL Context Service instance with the path to the default cacerts truststore that comes bundled with your Java installation, located at JAVA_HOME/jre/lib/security/cacerts. TrustStore is of type JKS, and the default password for Truststore is "changeit" .
If $JAVA_HOME Is set on your system, it should help point you in the right direction. If not, the location of cacerts varies depending on environment, but is approximately the following for their respective OS
If this response was helpful, vote/accept it as the best answer.
Created 07-25-2016 03:40 PM
This did help in updating SSL setting. I was looking for help with setting secret_id, client_secret. I guess Pierre posted example. Thank you for your quick response.
Created 07-25-2016 08:05 AM
Hi @Mehul Ramani,
You may be interested by this thread:
On this mailing list, @Jeremy Dyer has posted an example to access Salesforce with OAuth 2.0. I enclosed it to this answer: salesforce-oauth2-login-example.xml
I've also posted a blog regarding OAuth here:
https://pierrevillard.com/2016/04/12/oauth-1-0a-with-apache-nifi-twitter-api-example/
Created on 07-29-2016 04:26 AM - edited 08-19-2019 12:56 AM
Hi @Pierre Villard,
Thank you for sharing workflow. However I am having trouble with output port. I am getting error "Output connection for port 'SessionID' is not defined" . Looks like I am missing something. I am fairly new to this.
Thanks much
Created 07-29-2016 09:03 AM
I am not the author of the workflow but I'd say that the ouput port can be used if you want to use your FlowFile in following requests to Salesforce. You don't have to necessarily use it.
Created 09-09-2016 02:08 AM
@Mehul Ramani Hello , would you be able to guide me on how you proceed with the solution and flow. thx much
Created 09-10-2016 02:30 AM
Created 09-10-2016 12:33 PM
HI @Mehul Ramani my requirement is below .
based on the flow available, to get the token based on the flow that pierre share we are using invokehttp and then capturing the token. ( the access_token attribute is right ?) after that flow we can pass the token to another invokehttp processor to get the jason and do further processing . Since I am bit new to this , have confusion in parameter setting . did you used any specific parameter and attributes to pass token .
below is my requirement - sorry for this long post ,
The APIs are all accessed via REST invocations and return results in JSON format. The API use the OAuth 2.0 standard to authenticate all requests To authenticate to the API endpoint, we will need a token we send with every API call. To retrieve a token please follow the steps below- Request an access token by sending your Client ID and Client Secret via HTTP Basic Authentication, using an HTTP POST request. The Client ID and Client Secret need to be encoded to Base64, using the UTF-8 character set, in the form of client_id:client_secret. A resource you can use for this purpose ishttps://www.base64encode.org/.
This string is then passed as the Authorization header. The API will respond with an access token Note: Tokens are only valid for one hour. After one hour a new token is required. Pass the token as the Authorization header to access the API resources: API resource data is returned:
Created on 04-09-2024 03:06 AM - last edited on 04-09-2024 05:18 AM by cjervis
GetHTTP itself doesn't handle OAuth2 directly. Here's a breakdown of the process:
1. Obtaining Access Token:
2. Using Access Token with GetHTTP:
Important Considerations: