SGFGOV / medusa-plugin-shopify-ts

Typescirpt version of the popular shopify importer plugin
MIT License
1 stars 1 forks source link

MissingRequiredArgument [Error]: Missing access token when creating REST client #1

Open felixelement opened 1 year ago

felixelement commented 1 year ago

Hello

I filled the data

    api_key: process.env.SHOPIFY_PASSWORD,

      domain: process.env.SHOPIFY_DOMAIN,

But I got this issue, can you check?

Thanks

⠙ Initializing plugins MissingRequiredArgument [Error]: Missing access token when creating REST client at MissingRequiredArgument.ShopifyError [as constructor] (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/@shopify/shopify-api/dist/error.js:13:28) at new MissingRequiredArgument (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/@shopify/shopify-api/dist/error.js:180:42) at new RestClient (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/@shopify/shopify-api/dist/clients/rest/rest_client.js:16:19) at createClient (/Users/felixle/Downloads/6github_new/e6apparel-back-end/dist/utils/create-client.js:8:9) at new ShopifyClientService (/Users/felixle/Downloads/6github_new/e6apparel-back-end/dist/services/shopify-client.js:26:76) at container.register._g..lifetime (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/@medusajs/medusa/dist/loaders/plugins.js:441:112) at Object.resolve (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/awilix/lib/resolvers.js:295:20) at resolve (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/awilix/lib/container.js:287:41) at Object.get (/Users/felixle/Downloads/6github_new/e6apparel-back-end/node_modules/awilix/lib/container.js:66:33) ✔ Plugins intialized – 580ms ✔ Subscribers initialized – 8ms ✔ API initialized – 29ms ⠋ Initializing defaults (node:10933) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

github-actions[bot] commented 1 year ago

Thank you for your contribution, much appreciated. A few small issues and we should be good to go

SGFGOV commented 1 year ago

Hi,

This requires you to put a private app API key, not the shopify admin password. Did you create a private app API key ? Best regards

felixelement commented 1 year ago

Yes, I did.

felixelement commented 1 year ago

I used Admin API access token in ...admin/settings/apps/development/...

Could you please tell me it is correct or I use other?:

API key API secret key

SGFGOV commented 1 year ago

you need to use admin api access token from

https://yourdomain.myshopify.com/admin/settings/apps/development/your_app_id/api_credentials

SHOPIFY_DOMAIN: yourdomain Not yourdomain.shopify.com

felixelement commented 1 year ago

correct. I did it already ....