Getting Error when Making API Call in Zoho Creator to FreightCom API

Getting Error when Making API Call in Zoho Creator to FreightCom API

I want to make an API connection between my Zoho Creator app and the FreightCom API. Here is the code for my function:

```
string FreightComTest()
{
apiKey = "This is my API KEY. I have hidden it for security reasons.";

// Define your request headers, including the authentication header
headers = {"Content-Type": "application/json", "Authorization": apiKey};

// Define your request body (if needed)
requestBody = {}; // This is where my request body is.

response = invokeurl (endpointUrl, "POST", requestBody, headers, false);
return response;
}
```

Here is a link to the documentation for the freightcom api:

In the API documentation text file that they provided me, this is the authorization schema:

```
"components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    },
```


Here is the error I am getting returned:
```
{
   "responseText":{
      "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=9rJMtYMn1kqmJFimPqeC3JHt4fgEnROC9D83Cm7JTB6W26f93sIB1OgvhaGgemmn"
   },
   "responseHeader":{
      "date":"Sun, 25 Feb 2024 07:32:55 GMT",
      "content-length":"341",
      "x-amz-apigw-id":"Trn-SFpJCYcEIUg=",
      "x-amzn-errortype":"IncompleteSignatureException",
      "x-amzn-requestid":"cb927fcf-bdfe-4fe2-88c8-1d3895d31e7a",
      "content-type":"application/json",
      "connection":"keep-alive"
   },
   "responseCode":403
}
```

When I ran this through ChatGPT, it says that the API expects requests to be signed with AWS Signature Version 4.

I would prefer not to have to do this.

Anyone know a way around this?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方