Can I access App-data metafields in the App Embed Blocks?

Hi, I am using App Embed Blocks, and I want to embed some dynamic content in them.

Can I store values through App-data metafields and then access them in the block?

For example:


    {{ app.metafields.namespace_test.key_test }}

{% schema %}
  {
    "name": "App Embed",
    "target": "body",
    "settings": []
  }
{% endschema %}

I have created a metafield for the app using Admin GraphQL according to this example document. After testing, I actually got an empty string. If I can’t access app.metafields within the blocks, is there any other way to access the custom variables of the application?

I would be grateful for a response.

The problem has been solved. The cause of the issue was an incorrect accessToken, which belonged to another App.

1 Like