mobile-buy-sdk-ios: Mobile-buy-sdk forbidden issue

Hello experts,

I am new to shopify. Downloaded mobile-buy-sdk and integrate in my project by following the steps given in doc. I use sample app provided with this sdk to test if my store is working or not.

Now in sample app I just replace my apiKey in Client.swift but I am always getting the following error:

Exercising cache policy: CACHE_FIRST(3600)
Exercising cache policy: NETWORK_ONLY
Graph.QueryError: http(403)
Failed to load collections: Optional(Buy.Graph.QueryError.http(403))

Can anyone else tell me what else I need to set up to get details of my store’s data in this sample app.

Also do I need to set Storefront Access token in my app?

Can any one help me to resolve this issue.

Thanks in advance

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 28 (6 by maintainers)

Most upvoted comments

In Admin, inside your private app configuration, locate the Storefront API section (generally the bottom section). At the bottom, you’ll find Storefront Access Token with the following description:

Storefront API access tokens are not secret. You can place them in a JavaScript file or any public HTML document.

Use this token with your shop domain in the SDK.

Thanks @dbart01 for your suggestion, I have resolved the issue. the wrong apiKey which I used was not related to my shop’s sales channels.