client.request() secure parameter not working
Posted Apr 27, 2022
Hello everyone, I have a problem where I can't retrieve the values filled in the app using client.request.
My parameter is configured as follows:
{
"name": "integrationKey",
"type": "text",
"required": true,
"secure": true
}
When trying to call my method using client.request() my parameter is not populated correctly. The variable inside the {{setting.integrationKey}} is not recognized.
client
.request({
type: 'POST',
url: 'https://jet-commerce.vercel.app/api/auth',
contentType: 'application/json',
headers: {
Authorization: 'Basic {{setting.integrationKey}}',
Accept: 'application/json'
},
data: '{{setting.integrationKey}}',
cors: false,
secure: true,
httpCompleteResponse: true
})
.then(function (data) {
console.log('my', data)
return data['access_token']
})
How can I retrieve these parameters to use in my code?
0
5
5 comments
Eric Nelson
Thanks!
0
Matheus Souza Rigote
Hey Eric,
Please this would help me a lot as I can't retrieve the data from the safe parameters in my code.
Thank you in advance for your help
0
Eric Nelson
Mind if I move this into a ticket so I can take a closer look?
0
Matheus Souza Rigote
Hi Eric Nelson,
I have the app privately in an environment that we have for testing in Zendesk. In this case I'm not testing in local, I'm installing the app on the platform. We have the app published and the same problem occurs.

0
Eric Nelson
Are you serving your app from your local using ZAT or ZCLI?
Thanks
0
Sign in to leave a comment.