Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Does anyone have an example of how to get accessTokens for marketplace buyer-facing apps?

Does anyone have an example of how to get accessTokens for marketplace buyer-facing apps?

bovojon
Shopify Partner
24 0 1

Hi,

 

I am building a marketplace where users on my marketplace can purchase products on shopify. Since the update to Shopify Cli 3, I have not been able to create storefront access tokens with shopify-app-express.

 

I am trying to use the shopify-app-express example below, but it keeps returning a 401 and 404.  If anyone has a working example, I'd very much appreciate your feedback.

 

import { shopifyApp } from "@shopify/shopify-app-express";
const shopify = shopifyApp({

api: {

apiVersion: LATEST_API_VERSION,

restResources,

apiKey: 'my key',

apiSecretKey: 'my secret',

accessMode: 'offline',

scopes: ['read_products', 'etc.'],

hostName: 'ngrok link',

apiVersion: LATEST_API_VERSION,

isEmbeddedApp: true,

},

auth: {

path: "/api/auth",

callbackPath: "/api/auth/callback",

},

webhooks: {

path: "/api/webhooks",

},

sessionStorage: new CustomSessionStorage()

});
Replies 0 (0)