Freshdesk webhook issue with API Key auth using php endpoint

Hi. I’m trying out Freshdesk webhook automations, and for a test setup, I created an endpoint in a FTP server hosted in AWS to receive ticket data from Freshdesk (and then writing it in a Google Sheets document). The endpoint is receiving the request from Freshdesk but for some reason it can’t seem to authenticate correctly, even though when trying the same endpoint in Postman using the same API Key the response is sucessful.

These are the steps I followed with some screenshots:

  1. I created a php endpoint and uploaded it to a FTP server hosted in AWS, with API key authentication. My endpoint is written to receive ticket data from Freshdesk (in the format of the Freshdesk request sending data), and forwards it to a different endpoint that writes the ticket data in a Google Sheets document. If no API key is detected it throws an error response.

  2. I tested the endpoint in Postman and it worked OK - the ticket data sent in the body was written in the target document, and the response received from the endpoint was a success response.

Here’s the cURL for the request. The authorization is sent as bearer token:

curl --location 'https://<MY-PHP-ENDPOINT-URL>.php' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <MY_BEARER_TOKEN>' \
--data '{
        "ticket_id": 64562,
        "ticket_subject": "Ticket de Prueba Isaac",
        "ticket_description": "<div style=\"font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif; font-size:14px\"><div dir=\"ltr\">Este ticket es una prueba.</div></div>",
        "ticket_tags": "ops_test",
        "ticket_latest_public_comment": "",
        "ticket_priority": "Low",
        "ticket_source": "Phone",
        "ticket_cf_n_pedido": "NA",
        "ticket_cf_rut_cliente": "NA"
  1. I created a Ticket Creation automation rule in Freshdesk. The request is POST method and sends some ticket fields (ticket ID, ticket description, etc.) to the created endpoint.

  2. I tested the rule by creating a ticket with the required filters in Freshdesk. The request was received by the endpoint but the authentication by Freshdesk was apparently incorrect, and therefore no ticket data was written in the target document. Later Freshdesk sent to me an email alerting about the error response received by Freshdesk from my endpoint:

HTTP Status Code = 503,

Response Text = {"mensaje":"No Key"}

This is the response I coded in my endpoint for cases when no API Key was received in the request, expecting it as Bearer Token authentication (as in the cURL example from Postman above).

So my question here is if someone may help out with why Freshdesk is sending the API key authentication differently than Bearer Token authentication (since the request as sent by Postman works fine, but as sent by Freshdesk it fails). Alternatively, if someone knows how is the actual request made by Freshdesk and how it sends the API key, so that I may adapt the endpoint to receive/read the API key in the way Freshdesk sends it.

Thank you.