cancel
Showing results for 
Search instead for 
Did you mean: 

Http 401 error while connecting to SAP Open connectors through CPI

0 Kudos

Hi,

I am trying to do Google Drive open connectors scenario by following the blog Google Drive Integration with OpenConnectors.

However when I am giving authorization and trying to connect to Open Connectors using http receiver adapter it is showing 401 error("Invalid Organization or User secret, or invalid Element token provided") but the same is working when I am connecting through OpenConncectors Adapter with the same authorization.

As http is throwing error I am not able to post a file to Google Drive and I read that by using OCN adapter we cannot send attachments.

Can anyone help me to understand why http is throwing 401 error when this is working fine in OCN adapter.

Thanks and regards,

Shamili

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor

Hello Shamili,

Please whitelist Authorization header in your receiver HTTP channel ( Request Headers section ) then you should be able to get the data.

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Hi Sriprasad,

Thank you so much for the help. It's working.I am able to get the data now.

Thanks and regards,

Shamili

Answers (4)

Answers (4)

Sriprasadsbhat
Active Contributor

Hello Shamili,

You need to pass all the 3 credentials ( user,element and organization ) as is shown in the blog then it should work.

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Hi Sriprasad,

I am passing all the 3 credentials and still getting 401 error. When I deployed these in OpenConncectors credentials and connected through OCN adapter it is working fine, the problem I am facing is with http adapter(even after using all the 3 credentials I am facing issue).

Thanks and regards,

Shamili

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Shamili,

Can you try samequery in postman and check ( copy paste same value from Content Modifier ).

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Hi Sriprasad,

Just tried same query in postman with same authorization. I am able to see the data. The status is 200 Ok(successful).

Regards,

Shamili

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Shamili,

Could you share screenshot of Content Modifier ( where you are setting this header ) and also http receiver adapter screenshot ( I feel you are creating property instead of header ).

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Hi Sriprasad,

I am setting the authorization in header only.

Content modifier:

Http adapter:

sunny_kapoor
Advisor
Advisor
0 Kudos

Hi dshamili,

If you have deployed Open Connectors credentials, kindly edit and put the values again carefully. Sometimes an extra space or wrong copy paste may create a problem.

Regards,
Sunny

0 Kudos

Hi Sunny,

To pass the authorization to http adapter, i have added the authorization in header. I tried by deploying open credentials as well. But I am getting 401 error only.