Webhook auth token for Automations returns 401

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I set up a Cursor Automation with a webhook trigger. The webhook URL works (returns a response), but the auth header generated via “Generate auth header” always returns 401 unauthenticated, even when tested directly with curl from my terminal seconds after generating it.

Tested with: curl -X POST <webhook_url> -H “Authorization: Bearer crsr_…” -H “Content-Type: application/json” -d ‘{“test”: true}’

Response: {“code”:“unauthenticated”,“message”:“[unauthenticated] Error”,“details”:[…]}

thank you in advance

Steps to Reproduce

  1. Go to cursor.com/automations and create a new automation
  2. Add a Webhook triggered trigger
  3. Select a repo and branch
  4. Add instructions and save the automation (toggle Active)
  5. Click Generate auth header and copy the token (format: Bearer crsr_...)
  6. Immediately test with curl in terminal:
    curl -X POST "https://api2.cursor.sh/automations/webhook/<automation-id>" \
      -H "Authorization: Bearer crsr_<generated_token>" \
      -H "Content-Type: application/json" \
      -d '{"test": true}' \
      -v
    
  7. Response is HTTP 401 with body:
    {
      "code": "unauthenticated",
      "message": "[unauthenticated] Error",
      "details": [{
        "type": "aiserver.v1.ErrorDetails",
        "debug": {
          "error": "ERROR_NOT_LOGGED_IN",
          "details": {
            "title": "Authentication error",
            "detail": "If you are logged in, try logging out and back in.",
            "isRetryable": false
          },
          "isExpected": true
        }
      }]
    }
    

Operating System

MacOS

Version Information

online agents

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, this is a known issue with webhook authentication for Automations. It affected a lot of users over the last week, and a fix was deployed today.

Try this now:

  1. Regenerate the auth token using “Generate auth header” on the Automation page
  2. Retry the curl request with the new token

Main thread for this bug: Webhook trigger endpoint returns 401. I’ll post updates there if anything changes.

Let me know if the issue still happens after you regenerate the token.

1 Like

A post was merged into an existing topic: Webhook trigger endpoint returns 401