Recent searches
No recent searches
Zendesk JWT how to send custom data?
Answered
Posted Feb 01, 2021
Hello!
We have a closed common info on Help Center for our customers. We use Zendesk SSO JWT for authorization from https://support.zendesk.com/hc/en-us/articles/203663816#topic_w5x_1fh_3fb link and it works correctly, but in code, we have to provide a static name/email for payload. Like in example code. We'd like to allow every customer to log in with their own name/email. Customers open https://sub-domain.zendesk.com/ and I'd like to send some custom data (ex. customer_id) to catch which one sends a request on our side. How can I do it
Thank you!
payload = {
"iat": int(time.time()),
"jti": str(uuid.uuid1()),
"name": "Test Test",
"email": "test@test.com"
}
shared_key = settings.ZENDESK_SHARED_KEY
jwt_string = jwt.encode(payload, shared_key)
0
1
1 comment
Marco
Grigory Fateyev
You can use the "user_fields" (key/values) ... as documented here:
https://support.zendesk.com/hc/en-us/articles/4408845838874
0