Focuses on API authentication, access scopes, and permission management.
<script src="https://unpkg.com/@shopify/app-bridge@2"></script>
<script language="JavaScript">
var AppBridge = window['app-bridge'];
var createApp = AppBridge.createApp;
var actions = AppBridge.actions;
var Redirect = actions.Redirect;
var host = '[[${host}]]'
var apiKey = '[[${apiKey}]]';
var redirectUri = '[[${redirectUri}]]';
var permissionUrl = 'https://'+
host+
'/admin'+
'/oauth/authorize?client_id='+
apiKey+
'&scope=read_customers&redirect_uri='+
redirectUri;
var app = createApp({
apiKey: apiKey,
host: host
});
Redirect.create(app).dispatch(Redirect.Action.REMOTE, permissionUrl);
</script>
👋 tinyemail,
I'm happy to help out with this issue!
I think you're referring to App Bridge, when you say "Load Bridge". I should clarify that App Bridge is not a requirement for an embedded app. It's just a library that allows you to more deeply integrate with Shopify. It might simplify things if you don't add App Bridge unless you need it.
I'm 100% clear on what the error is. It doesn't look like your screen shot / media was properly attached. If you want to re-attach it, I can dig in further.
Thanks!
Elana
To learn more visit the Shopify Help Center or the Community Blog.