cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Triggered task by webhook - authentication issue

jfpelletier
New Contributor III

Hello all,

I have created a triggered task to receive the webhooks generated from another web application when changes are detected. This works well with Postman, I can use the task URL and the authentication token in the Authorization header, and SL executes the pipeline.

The application that sends the webhooks has a very simple configurable interface where only the URL and the token can be configured, and I was told that the token is passed as parameter to the URL using the key "x-customapp-token".

Of course SL rejects the connection because the application is not authorized, so I tried to map the token sent as "x-customapp-token" to an authorization header using a mapper in an open-end pipeline, but that doesn't work.

jfpelletier_0-1701199711726.png

Is there a way to map this token somehow so that the application can be authenticated?

Thanks!

JF

1 ACCEPTED SOLUTION

koryknick
Employee
Employee

@jfpelletier - if you can't get the webhook to pass the Authorization Bearer token in the HTTP header parameters, you can always specify the bearer token as a query parameter.  See the Running a Triggered Task documentation and refer to the "Run a Pipeline using a Bearer token for authentication through the bearer_token query parameter" example.

Hope this helps!

View solution in original post

2 REPLIES 2

koryknick
Employee
Employee

@jfpelletier - if you can't get the webhook to pass the Authorization Bearer token in the HTTP header parameters, you can always specify the bearer token as a query parameter.  See the Running a Triggered Task documentation and refer to the "Run a Pipeline using a Bearer token for authentication through the bearer_token query parameter" example.

Hope this helps!

jfpelletier
New Contributor III

Hello @koryknick,

Thanks a lot for this! I actually already saw that documentation and didn't think it would work because I thought that the "bearer_token" query parameter was a specific case used as example.

I was wrong and it worked perfectly first time (I should have tried harder...). Anyway thanks a lot again!

Kind regards,

JF