Receiving "Not Valid key=pair" error when calling my custom Webhook functions using API Tokens

I’m trying to authorize a GET request to a test webhook function I deployed using an API Token and it’s not working. Can anyone help me know what’s wrong? I need this to work so that I can run a machine to machine API call.

# 8base.yml
      code: src/test.js
    type: webhook
    method: GET

Curl command - I ran this in Postman too and got the same response.

curl -X GET "{MY_WORKSPACE_ID}/testFn" \
       -H "Content-Type: application/json"  \
       -H "Authorization: Bearer {MY_API_TOKEN}"

The error I’m getting.

Response Code: 403
    "message":"'36a40cb5-b798-40e1-a9c5-5f56563c7d02' not a valid key=value pair (missing equal-sign) in Authorization header: 'Bearer 36a40cb5-b798-40e1-a9c5-5f56563c7d02'."

One last thing, I made the SAME request using my logged in auth token (bearer token) and got the exact same error.

Please help! Thanks

Hey @axel_j - it looks like you’re calling the wrong path. Sorry that the error message is not more descriptive.

Try changing the endpoint to: “{MY_WORKSPACE_ID}/webhook/testFn

All webhook paths get prefixed with ‘webhook’.

Hope this helps and we’ll see what we can do about the error message going forward!

1 Like

Lol, my bad. That worked!

Yes, the error message could have been better…

1 Like