App Configuration using v2

Answered

12 Comments

  • Cedric Jacob

    Hi Eswari,

    I hope this message finds you well and healthy.

    You would do this by adding parameters to your manifest file:

    "parameters": [
      {
        "name": "subdomain",
        "type": "text",
        "required": true,
        "secure": false,
        "default": "yoursubdomain"
      },
      {
        "name": "token",
        "type": "text",
        "required": true,
        "secure": true
      },
      {
        "name": "useSSL",
        "type": "checkbox"
      }
    ]

    You can retrieve the setting values in your app with client.metadata():

    var client = ZAFClient.init();
    client.metadata().then(function(metadata) {
      console.log(metadata.settings);
    });

    You can find more here: https://developer.zendesk.com/apps/docs/apps-v2/setup#defining-installation-settings 

    Hope this helps.

    Cedric

    1
  • Tom Bartel

    This only gives me the possibility to set app parameters at installation time. However, I cannot set/modify the parameters at a later (post-installation) time.

    What I would  need is an "App Configuration" page like the one attached. "parameters" does not seem to give this to me. Any tips?

    0
  • Becca
    Zendesk Team Member

    Hi Tom - 

    You can update an app's settings at any time using ZAT tools - there is more on updating an installed app here - https://developer.zendesk.com/apps/docs/apps-v2/using_sdk#updating-an-installed-app 

    The options listed on the App Configuration page are the option parameters declared in the app's manifest.json. In your example of the Answer Suggestion app, the App Configuration page is asking for input values for the "Number of Results" and a "Custom Domain." There options were added by declaring the options are settings in the app's manifest. Here's the Answer Suggest app's Github repo- 
    https://github.com/zendesk/answer_suggestion_app/blob/master/manifest.json  

    If you are looking to create a user settings or configuration page, the options are parameters declared in your manifest as mentioned above or alternatively, we also have the option to Create a Settings Page for Users. There is more on this here -  https://developer.zendesk.com/apps/docs/apps-v2/setup#creating-a-settings-page-for-users  

    Hope this helps! 

    0
  • Alexander Smirnoff

    Hi all,

    Let's assume I've installed an App that contains ApiKey and ApiSecret on the settings page. For the first run I get this pair and make request to my server to obtain a JWT token.

    How to store my JWT in App settings and to have possibility to update it in the future?

    0
  • Jonny

    Hey there Alexander,

    Your question definitely requires some additional questioning, I've gone ahead and created a ticket on your behalf and will continue to assist you there. 

    Cheers, 

    0
  • Pradnya Sham Thorat

    Hi Alexander,

    Were you able to store the JWT in App settings?

     

     

    0
  • Devan - Community Manager
    Zendesk Community Team

    Hello Pradnya,

    Would you mind sharing a bit more details on what issue or problem you are looking to resolve?

    Best regards.

    0
  • Pradnya Sham Thorat

    Hi Devan,

    I am getting the JWT token on my remote express server when the app is loaded through signedURLs. I want to use this token in my subsequent calls to the server. Can you please let me know a way of implementing that? I came across httpOnly cookies. But I think they don't work for cross domain requests. So I am trying to find another way. Also, can you please let me know how to get the information for which zendesk domains have installed or uninstalled my app?

    0
  • Joey

    Hi Pradnya-

    You’ll need to save that validation state via a cookie, localstorage, or some other session authentication method. For more information I suggest this article.

    0
  • Paulo Alves

    Hi @...,

    Just noticed your suggestion and I've some questions about it.

    • I'm trying to save the state in a cookie after receiving and validating the signed request. However, how can I use this cookie if the ZAF requests are being through a proxy? I'm asking this because the cookie will be set for my app domain, not the proxy one.
    • Do I need to get the public key for each instance in order to decrypt it? Or is the public key global for all the app installations?
    • I need to perform some REST API requests from the backend. I'm thinking about having a secure parameter with the API Token and send it using the ZAF request. Is this the best approach for this?

    Kind regards,
    Paulo Alves.

     

    0
  • Brett Bowser
    Zendesk Community Team

    Hi Paulo​,

    Brett​ here from the Zendesk Community Team!

    We noticed your question is related to Zendesk Apps Framework. We’re currently hosting a Zendesk Apps Framework (ZAF) AMA in our Community forum at this very moment, where our special guest team of experts are available to answer your development questions. We think other users would also benefit from seeing your question and the proposed solution. If you've got something you want our experts to look at, post here to receive a response by the end of the AMA.

    Best Regards!

    0
  • Bryan - Community Manager
    Zendesk Developer Support

    Closing this post -- moved conversation over to AMA post: https://develop.zendesk.com/hc/en-us/community/posts/360037266834-Doubts-about-Authenticating-Zendesk-in-your-server-side-app

    0

Post is closed for comments.

Powered by Zendesk