Checkout Api Using Nodejs

kulwinder21
Shopify Expert
8 0 1

Hello,

 

I am trying to create  checkout through checkout api, i am using npm modules https://www.npmjs.com/package/shopify-api-node

 

But i am getting error 403 forbidden.

 

Please let me know how we can use checkout api.

Thanks

Reply 1 (1)

Alex
Shopify Staff
1561 81 341

Your issue is that of OAuth scopes. You don't have permission to create those resources.

 

Unless you're a sales channel, you need to use the GraphQL Storefront API to create checkouts, which will ultimately need to be completed on the web interface.

 

shopify-api-node, while it seems to support GraphQL, only supports the GraphQL Admin API, which does not support checkout creation (again unless you are a sales channel).

 

Your path forward is likely going to be creating a GraphQL Storefront API client by either forking or contributing to that library, finding an existing one, or creating your own.

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog