Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

API Integration Key - Authorization

dhwanit_shah3
Discoverer
0 Likes
894
  • SAP Managed Tags

Hello Geeks,

I have an issue where i am trying to connect to API service which accepts SHA256 bit encrypted BAse64 string which should include API Key as well. I am using class "cl_abap_message_digest=>calculate_hash_for_char" - but this only converts URL that i am passing. Along with URL i still need to pass API Secret key provided by vendor which is "CPv3+fT6er!]yKvp". Vendor recommends this conversion from website "https://hash.online-convert.com/sha256-generator". However i need to this dynamically in the loop while i make each call. Can someone please help me find the Class or FM which can convert this for me?

Really appreciate your responses.

Thanks.

2 REPLIES 2
Read only

isuru_fernando24
Explorer
663
  • SAP Managed Tags

Hello Dhwanit,

Did you check the possibility of converting the base64 using CL_HTTP_UTILITY?

Cheers!

Isuru

Read only

dhwanit_shah3
Discoverer
0 Likes
663
  • SAP Managed Tags

Hi Isuru,

Yes, i looked at that option. I think i found the solution. I am using class cl_abap_hmac now. This does give me the Authorization link i am getting.

Thanks - Dhwanit.