We're Hiring!

Mattermost, Inc.

Base64 TriggerID Decoding Fails

I’ve been having an issue with Mattermost failing to decode the triggerID I send to create a dialog. Mattermost sends a triggerID, I grab it, and in my JSON I return the same triggerID. I’ve gone through myself to grab them both and be sure I’m returning the proper triggerID, I see no issues anywhere that should be causing it.
Console log:

"msg":"Failed to decode base64 for trigger ID for interactive dialog.",
"err_details":"illegal base64 data at input byte 216"}

Looking at byte 216, I found nothing that would result in an error. I have no issue decoding this string on my side in Java, but know that this error originates from the Golang base64 decoder.

Anyone have an issue similar, or know a fix?

(Example triggerID, taken from my latest attempt)

Mattermost sends:


I give it back:


Mattermost’s method of base64 decode (find DecodeAndVerifyTriggerID)

Update for anyone who may run into the same issue: it looks like because the data is in a urlencoded form, my parsing of it was weird and might’ve removed the equal signs at the end of the triggerID. My call isn’t working still, but I believe it’s due to other errors now. Will update when the whole api call works to confirm.