Hawk Authentication

Hi everyone,
I’m trying to set up an API workflow in Retool that requires Hawk authentication. I’ve written a JavaScript function to generate the Hawk header, and it seems to produce the correct output. However, when I use the header in my API requests, I consistently receive a 401 Unauthorized error.

The same setup works perfectly in Postman, which supports Hawk authentication natively. I suspect there might be an issue with how the request is sent from Retool, but I’m not sure how to debug this further.

Has anyone else encountered this issue or successfully implemented Hawk authentication in Retool? Any advice or examples would be greatly appreciated!

Thanks in advance!

Hey @Dennis_D,

D you have a custom authentication in place? If so, that is not compatible with workflows as stated here.

Hi @MiguelOrtiz ,

I don´t use it in a workflow, just a normal REST-API request for getting some data in a table.

For the REST-API resource i need to use a hawk authentication in the header. Because its not a supported auth-method in retool i used custom auth. First step is a javascript thats creating the hawk header which I then use in the resource header for authentication.


Ok, when testing the auth workflow I already got the query data back
chrome_9SKVcrPZuL

Hey @Dennis_D! Thanks for reaching out.

In order to make data from within the custom authentication flow available in the resource configuration itself, you need to explicitly export a variable.

Only then can you reference said variable, as shown below.

I hope that helps! Let me know if you have any additional questions. :+1: