Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Timothy 5 posts 65 karma points
    Mar 16, 2022 @ 12:37
    Timothy
    0

    Umbraco 9 - translating web.config key (umbraco 8) to umbraco 9 (appsettings.json)

    Trying to get started with umbraco 9 and the following package https://our.umbraco.com/packages/backoffice-extensions/shopify-umbraco-cms-integration/

    The documentation reads:

    Use the access token and add it to an app setting in Web.config alongside settings for the API version and the name of the shop:

    <appSettings> ... <add key="Umbraco.Cms.Integrations.Commerce.Shopify.ApiVersion" value="2022-01" /> <add key="Umbraco.Cms.Integrations.Commerce.Shopify.AccessToken" value="[your access token]" /> <add key="Umbraco.Cms.Integrations.Commerce.Shopify.Shop" value="[your shop's name]" /> ... </appSettings>
    

    I'm having trouble understanding how/where these keys should be formatted / placed in the appsettings.json file that replaces the web.config in Umbraco 9! any help is very welcome, thanks!

  • Ambert van Unen 175 posts 819 karma points c-trib
    Mar 16, 2022 @ 13:06
    Ambert van Unen
    0

    It basically says so already in the path of the key:

    For example:

    "Umbraco": {
      "CMS": {
        "Integrations": {
          "Commerce": {
            "Shopify": {
              "ApiVersion":  "2022-01",
              "AccessToken" : <token>
            }
          },
    

    Same for the other keys.

  • Timothy 5 posts 65 karma points
    Mar 16, 2022 @ 13:43
    Timothy
    0

    I tried this very setup, however still getting same error in the backoffice plugin:

    "No access token or OAuth configuration could be found. Please review your settings before continuing."

    I tried the documentation suggested setup in Umbraco 8, with the same accesstoken etc. where everything works fine. So I'm still not sure if this nested format is right (?) or if its a version specific issue (Umbraco version 9.3.1)

  • Ambert van Unen 175 posts 819 karma points c-trib
    Mar 16, 2022 @ 13:58
    Ambert van Unen
    0

    On the source site is an example testsite, which also contains an appsettings.json example, hope this helps:

    https://github.com/umbraco/Umbraco.Cms.Integrations/blob/3878f36c07343a9ffb74c08ec5a136e3670d5424/src/Umbraco.Cms.Integrations.Testsite.V9/appsettings.json

    enter image description here

    It's for a different integration, but it seems to be based on the same source, so you'd think it should be similar.

    Perhaps your issue is related to this: "If you prefer not to use an API key, an authentication flow using OAuth is also available. To use this, simply ensure you don't have an API key in your configuration file.

  • Timothy 5 posts 65 karma points
    Mar 16, 2022 @ 14:22
    Timothy
    100

    Thank you! The linked test-site example did reveal I was missing "Settings" in the configuration, which was not really clear reading the provided documentation. For anyone wondering how it should look:

    "CMS": {
          "Integrations": {
              "Commerce": {
                "Shopify": {
                  "Settings": {
                  "ApiVersion": "2022-01",
                  "AccessToken":"<AccessToken>" ,
                  "Shop": "<ShopName>"
                  }
                }
              }
            }
          },
    
Please Sign in or register to post replies

Write your reply to:

Draft