Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

APEX 21.2 consume REST API with HTTP header authorization

prieschr73Apr 6 2022

Hi,
I am trying to consume a REST API in APEX 21.2 which requires a dynamic http header authorization like this:

Authorization: Signature keyId="{API-KEY}",algorithm="hmac-sha256",
   headers="(request-target) host date content-type content-length",
   signature="{BASE64-HMAC-VALUE}"

Example of the HTTPS request:

POST /v2/cases HTTP/1.1
Host: xxx.xxx.com
Date: Tue, 07 Jun 2020 20:51:35 GMT
Content-Type: application/json
Content-Length: 88
Authorization: Signature keyId="1234",algorithm="hmac-sha256",
   headers="(request-target) host date content-type content-length",
   signature="Iktz/AdXHmDouNm6uBB8ZW0xcfNGuWGDxmX9TFMwuF0="

{
  "xxx": "xx xxx x",
  "yyy": "yyyyy yy",
  "yyy": ["XXXXX"]
}

I have checked the documentation and the examples but I cannot find more information how to best implement this. How can I set this dynamic part? Is there any similar example available?
Thank you for your answer in advance
Reinhard

Comments
Post Details
Added on Apr 6 2022
3 comments
1,102 views