Webhooks - Authorization Bearer Token

Hey Guys,

i have problem to submitt the Authorization Bearer Token via webhooks for a webservice.
The response is allways Unauthorized

I found out, that the token miss character at the end of the token if i submit via webhooks.

here is my webhook:

  "eventName": "MyWebHook",
  "url": "https://MyUrl/api/v1/play",
  "requestType": "POST",
  "headers": {
    "Authorization": "bearer {{my_token}}"
  "mydevices": true

and the part of the firmware where i publish:

Particle.publish("MyWebHook", "{ \"my_token\": \"" + token + "\"}", 60, PRIVATE);

this is the response to get the token (Dashboard):


i save this token in the variable token.

this is shown (Dashboard) if i publish the MyWebHook Webhook


The Part: NjcwYjExZmQ3YSJ9 is missing.

i double checked the token variable. Its complete.

How long is your published data?


@GetMeOutOfHere, we confirmed the 255 byte limit for the publish. Your token by itself is 256 bytes :confused:

1 Like

you are right.
I can´t use particle webhooks for that :unamused:

How often does your token change and would you dare to put it into the webhook definition instead? (if that’s possible at all)
The 255 limit only applies to Particle.publish() but not the webhook as such.

Token change with every login and will lose his validity after one hour.
That is much to often to put the token into the webhook definition.

The Service use JSON Web Tokens - > https://jwt.io/

JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.

Too bad :wink:

yes but thanks alot for your answers.

I see this is a pretty old thread, is there any way around this now?