Encoding and sending ZAF JWTs
Hey, I have a technical question and don’t see much support for it online so wanted to reach out here for finding more answers.https://developer.zendesk.com/documentation/apps/getting-started/making-api-requests-from-a-zendesk-app/#encoding-and-sending-zaf-jwtsI have been following the above guide for authenticating the Zendesk Side App to the Backend Server (Rails) using JWT. When I was testing this out in my local, I’m unable to get that working since the secure
options need to be set to true on the docs but that doesn’t work well in our locally, and in one of the supported articles, I have read that this needs to be turned to false.
When the secure
config set to false and the authorization header jwt.token
doesn’t pass in the encoded header to the backend. It’s just passing that string directly. Any thoughts on how to get that up and working?
Request:
const options = {
url: "http://127.0.0.1:3042/api/v1/zendesk",
type: "POST",
headers: {
Authorization: "Bearer {{jwt.token}}",
},
jwt: {
algorithm: "HS256",
secret_key: "{{setting.shared_secret}}",
expiry: 3600,
claims: {
jti: "8883362531196.326",
iss: "127.0.0.1:3042",
},
},
accepts: "application/json",
cors: true,
secure: false,
};
client.request(options).then((response) => {
console.log(response);
});
-
Hey Suryateja,
Just checking in to see if you were able to find a solution to your issue? If not, let me know and I can look in to it for you.
Thanks!
Tipene
Iniciar sesión para dejar un comentario.
1 Comentarios