How can I post with curl a sentry event? Which authentication credentials?

Hi, this gist contains a lot of useless things and is additionally outdated. This should work:

curl --data '{ ... }' \
  -H 'Content-Type: application/json' \
  -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$SENTRY_KEY, sentry_client=raven-bash/0.1" \
  https://sentry.io/api/$PROJECT_ID/store/

$SENTRY_KEY is the hash in the DSN, $PROJECT_ID is the integer at the end of the DSN.

Also consider https://docs.sentry.io/clientdev/overview/?platform=javascript which contains a lot of useful information should you decide to write your own SDK

4 Likes