API GET request works on postman but NOT on katalon with same Authorization and access token

Hello All,

I have seen similar issue posted on forum but there was no concrete solution.

I am trying to execute GET request on Katalon which takes authorization , access token and content type i as header parameters.

The URL looks like
https://${uri_code}.execute-api.${aws_region}.amazonaws.com/api/users/${tenantId}

I get 403 response code with error message as

{
“message”:“Authorization header requires ‘Credential’ parameter. Authorization header requires ‘Signature’ parameter. Authorization header requires ‘SignedHeaders’ parameter. Authorization header requires existence of either a ‘X-Amz-Date’ or a ‘Date’ header. Authorization=eyJraWQiOiJHV3Q3b2FhM29vTmRadHNRcmx0R2FQVmxJbzFGXC9BSG1QSW1LajM0ZDI5cz0iLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoiNDJtbU9hejZ1NkpBZnZ2VDJEQkNqUSIsInN1YiI6ImMzMjU1NWI1LTkwNWYtNDk3Zi04MWM0LThlN2E1OTE2OTg0ZiIsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX0JlRTdYazdtVCIsImNvZ25pdG86dXNlcm5hbWUiOiJhZG1pbmlzdHJhdG9yIiwiZ2l2ZW5fbmFtZSI6IlNJVCIsImN1c3RvbTpob21lX3RlbmFudF9pZCI6IjM0NWVjZWNhYzQzNjQ4NTZhNzlmYTBhM2ExODYzMjZkIiwiYXVkIjoiMjRtbHQ0NXNiNmdxbGdxdnFzZjA2NG1oZyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNTY0NzA3OTYwLCJleHAiOjE1NjQ3MTE1NjAsImlhdCI6MTU2NDcwNzk2MCwiZmFtaWx5X25hbWUiOiJTeXN0ZW1JbnRlZ3JhdGlvblRlc3QiLCJlbWFpbCI6InJhamVzaHJpLnphZGVAaXIuY29tIn0.lgtl5mENq6i2zoY09FwhyyRv6CfF0tMQlW8-VV19D-63UD4i-5Hs5SPz_6sBRS9qEHPjrHUV2RrE07bVtPbd9R1m_jB8FC_V6yKr2WDTQ0fzjILolSGpyug9SWjIFHGQe1kflBqFaeHqizBBxuMdk17EdEbbS7BnUTTXPNGycI5JtFLHOH9BwlSb59Lj_4TuAcETfDUGCVQXbxLengc2PveLw6VgWBVvVyMqArUrAOhxT9Ia0D1ORy1PVRekX6kLVqtZw8xyT-1Z3JibFjxADB32XJzfoUkOWYTKu62VO3k7yRPg_HTHBkZRCzyrArPKX6WjaMguwTrOOZw3UpCm4A”
}

When I run the same GET request with same parameters I get proper response as below

Variables values were passed same as passedin katalon through environment variables (in Postman).

Could anyone please help me? @kazurayam

@huynguyen @ThanhTo Could anyone help here please? I saw your contribution to lot of API questions on the forum; hence tagging you both here.

@rajeshri.zade

You should assert that the value of Authorization header which you see in Katalon is the same as the one you see in Postman. Can you print the value of {{Authorization}} header in Postman?

The AWS document shows an example of Authorization header :
https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html

The example Authorization header looks different from the one you see in Katalon. I am not sure though …

Yes. They are same. Because at the moment I am setting those values from environment variables ( in Postman ) and Global variable ( in Katalon)

I tried printing its the same.

Authorization=eyJraWQiOiJHV3Q3b2FhM29vTmRadHNRcmx0R2FQVmxJbzFGXC9BSG1QSW1LajM0ZDI5cz0iLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoiM1FhclJfWjd1ZmJVU0xId1VaWmpMdyIsInN1YiI6ImMzMjU1NWI1LTkwNWYtNDk3Zi04MWM0LThlN2E1OTE2OTg0ZiIsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy13ZXN0LTIuYW1hem9uYXdzLmNvbVwvdXMtd2VzdC0yX0JlRTdYazdtVCIsImNvZ25pdG86dXNlcm5hbWUiOiJhZG1pbmlzdHJhdG9yIiwiZ2l2ZW5fbmFtZSI6IlNJVCIsImN1c3RvbTpob21lX3RlbmFudF9pZCI6IjM0NWVjZWNhYzQzNjQ4NTZhNzlmYTBhM2ExODYzMjZkIiwiYXVkIjoiMjRtbHQ0NXNiNmdxbGdxdnFzZjA2NG1oZyIsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNTY0NzIwOTMzLCJleHAiOjE1NjQ3MjQ1MzMsImlhdCI6MTU2NDcyMDkzMywiZmFtaWx5X25hbWUiOiJTeXN0ZW1JbnRlZ3JhdGlvblRlc3QiLCJlbWFpbCI6InJhamVzaHJpLnphZGVAaXIuY29tIn0.CZY-Xpw1_dIAp1U-YIQh64EMCvWlYoVjwI34it2BVT3hKqmcVNkiQuOYFm0afKOm19zVbZXqkFwLnGBEhE1Np6884YxTSFGY0za5A61uMonAs5aQIMP16e15e_kO2rHY7lk3Awof-HvtOh8ZBaeu8us56jarkq4-oErundes6yocb3i-AXTb-mECnKWYntgFibr_nY5YwhjsPxa9D887jEWEWRMYFnZ5DVEF-xKAH5kADKTpZMQdaOAJXEtr186n7q1CiyKRkxmC5bn3LuYaUcbNJud2Vt6nG1V_GPFcgjwJhyJoqAzRgWUomdO7FDW3ACm15UVsYfMasyJ69f4QSQ"

Please note that its different form the screen-shot when I posted the query as its different now.

Hi @rajeshri.zade,
From the response message and refer to the document that @kazurayam shows, it seems that your authorization header is missing some information. Are you sure that the one you provide is correct?

I googled with key

Authorization header requires ‘Credential’ parameter. Authorization header requires ‘Signature’ parameter. Authorization header requires ‘SignedHeaders’ parameter. Authorization header requires existence of either a ‘X-Amz-Date’ or a ‘Date’ header

then I got a list of a few relevant posts in StackOveflow. It seems that you are not the only one who encountered this insident. Have a look at those posts, then you may get some Aha!

Yeah. Its the right one!

Could you describe what exactly was the cause of your problem, just for the sake of other guys encountering the same?

@kazurayam I have just now found out that the URL has a variable which is a global variable’s value and it gets set by test cases’s previous step execution.
There was a problem in the previous step which made that dynamic variable’s value (in URL) as empty ‘’
When I passed the right value the it works.
So there was nothing wrong with authorization/API keys.
Thanks, All for your inputs.