cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud Platform Open Connectors - Twitter Connection

odickinson
Explorer
0 Kudos

Dear all,

I try to send a status post with iFlow via SAP CP Open Connectors to Twitter. However, it does not work and I do not know why. I hope someone of you can help me.

Scenario:
Postman --> SAP CP Integration (iFlow) --> SAP CP Open Connectors --> Twitter

I configured the iFlow with the Open Connectors-Adapter (see attachment). In Postman I get the error code 404 "Not found - The requested resource is not found". I tried several configuration (and get error codes 400 or 405) but I did not get the correct one. So what is wrong?

Thanks and best regards
Oliver Dickinson

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Oliver,

Below will help you to get the issue resolved and you should pass the status as body from Postman instead of sending the same in Openconnectors channel.

Step 1: Create your application in Twitter and get the

Step 2: Configure the Open Connectors and get the authorization header value.

Follow below blog to create Security artifact using auth header created in SAP Open Connectors.

https://blogs.sap.com/2019/03/13/cloud-integration-how-to-create-a-sample-integration-scenario-using...

Step 3: Create Security Artifact in SAP CPI.

Step 4: Configure your SAP CPI receiver OpenConnectors Channel

Step 5 : Send data using PostMan tool.

Sample JSON:

{
    "status": "Test Tweet from SAP CPI"  
}

Regards,

Sriprasad Shivaram Bhat

odickinson
Explorer
0 Kudos

Hi Sriprasad,

Thank you very much. It works. I think the Postman configuration was wrong all the time.

Do you have any other ideas about the configuration with the Twitter Adapter (see discussion with Anil)? This configuration still not work.

EDIT: Ok, I got it. It works. Not all parameters was configred as "secure parameter". Some of them was configred as "user credentials".

Thanks and best regards
Oliver

Answers (3)

Answers (3)

sumanth171
Active Participant
0 Kudos

Hi Oliver,

As per your initial screenshot, the parameter name should be as q='screen_name'(ex: q='scottdillon1'). use q instead of status and try.

Also, can you please attach the twitter channel configuration and will see if any failure reason. There is no specific naming convention.

odickinson
Explorer
0 Kudos

Hi Anil,

1. Connection with Open Connectors

I changed the configuration and tired it again. Now I get an 400-error:
HttpResponseException: An internal server error occured: HTTP operation failed : 400.

2. Connection with Twitter Adapter

I changed some settings but I still get an error:
HttpResponseException: An internal server error occured: twitter or twitterStream or all of consumerKey, consumerSecret, accessToken, and accessTokenSecret must be set!.

Tanks and best regards
Oliver

odickinson
Explorer
0 Kudos

Additional Screenshot:

sumanth171
Active Participant
0 Kudos

Hi Oliver,

1. To resolve the issue, you have to deploy your consumer key, consumer secret, Access token, Access token Secret in SCPI security Material. You can get all those values by following the below link.

https://docs.inboundnow.com/guide/create-twitter-application/#toc-0

2. Different Approaches:

SCPI - It has only send a message and search options.

Open connector: support various functionalities.

To try open connector approach, go to it service and Authenticate. All you need to give is the name of instance and click on create instance. You need to login Twitter developer account and approve the app created in step 1.

Regards,

Anil

odickinson
Explorer
0 Kudos

Hi Anil,

1. I know. I deployed it already but I got this error. So what is wrong? Is there a naming pattern?

2. Yes, I already did it and it works fine for getting data from Twitter. It doesn't work for sending data to Twitter (see my configuration in the initial question). So why doesn't work it? What kind of configuration are wrong or missing?

Thanks and best regards
Oliver

sumanth171
Active Participant
0 Kudos

Hi Oliver,

For direct integration of CPI with twitter, you can follow below blog to achieve. Do you have any specific reason to use open connector in between?

https://sapintegrationhub.blogspot.com/2019/05/twitter-receiver-adapter-in-scpi.html

Regards,

Anil

odickinson
Explorer
0 Kudos

Hi Anil,

Thanks for your answer.

It's just to get experience with the Open Connectors. But the better question is why offers SAP two solutions for one “problem”? Twitter Adapter AND Open Connector API? (see also Facebook Adapter)

I tried out with the description from the blog for the Twitter Adapter. Now I get an error while deploying the iFlow:
CAMEL][IFLOW][CAUSE] : Cause: com.sap.it.nm.types.NodeManagerException: [CONTENT][CONTENT_DEPLOY][NoArtifactDecriptorFoundForArtifactName]:No artifact descriptor found for artifactName <Consumer API Key>

Is there a specific naming pattern for the secure parameter configuration?

Nevertheless, do you have an idea about the Open Connector configuration?

Thanks and best regards
Oliver