client.request() using secure parameter in manifest.json

4 댓글

  • Blog Beginner

    This worked with the following code. 

    const oAuthResponse = await client.request({
          type: 'POST',
          url: "",
          contentType: 'application/json',
          headers: { "Authorization": "Basic {{setting.client_secret}}", "Accept": "application/json"},
          data: 'grant_type=client_credentials',
          cors: false,
          secure: true,
          httpCompleteResponse: true
      ).then(function(data) {
          console.log('...oAuthResponse', data);
          return data;

    So the data field should have been text instead of JSON. 

  • Tipene Hughes
    Zendesk Developer Advocacy

    Hi Blog Beginner,

    Glad to see you got it figured out, and thanks for updating us!

    Have a great day :) 


  • Ravi

    Hi Tipene Hughes,

    I am also tring to access secure settings but facing same issue with bearer token. Attached screenshot of error and code.
    Any help would be appriciated.

  • Tipene Hughes
    Zendesk Developer Advocacy

    Hey, Ravi!

    Can you confirm that you have a domain whitelist correctly configured in your manifest.json file? You can read more about domainWhitelist here:




댓글을 남기려면 로그인하세요.

Zendesk 제공