Data string is too long for Particle.publish to webhook

photon
Tags: #<Tag:0x00007fe22907bee0>

#1

Any ideas on how I can send my access token to a webhook when the token is too long? I am using OAuth to get an access token which is around ~1000 chars. The max character count for the data field is currently 622 for Particle.publish()

Is there a way I can send and store half of my access token to webhook in a variable that exists in the cloud and then append to that variable? And pass that variable in the HTTP headers when I call publish?

Or another work around?

(I saw an old post with the same question, when the limit was 255, but it wasn’t answered)
Help! Please and thank you


#2

When you create a webhook you can add custom fields. The example in tutorials even sets a specific api_key custom field which is pretty much what you are trying to do. You can then use that custom field in your webhook, name it in mustache templates for generating the HTTP, etc.