Solved

Mo

gabriel_fu_200
Shopify Partner
5 1 1

Hi, we are trying to use the MobilePlatformApplication to create the application in postman but failed. Can anyone advise please?

 

Below is our payload

{
  "mobile_platform_application": {
    "application_id""com.barkmall.app",
    "platform""ios",
    "enabled_universal_or_app_links"true,
    "enabled_shared_webcredentials"false
  }
}
 
And this is the response (X-Requst-ID is f22c801f-8a76-41d8-855a-d67c6a732cfb) -
<html>

<body>
    <noscript>
        <a
    </noscript>

    <script type="text/javascript" defer>
        window.location = "https:\/\/accounts.shopify.com\/oauth\/authorize?client_id=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c\u0026destination_uuid=198dd353-a74e-4e7d-bfb4-3feda5c12d44\u0026nonce=9fc6444fc4d5eaede645e203394a8727\u0026prompt=merge\u0026redirect_uri=https%3A%2F%2Fbarkmall.myshopify.com%2Fadmin%2Fauth%2Fidentity%2Fcallback\u0026response_type=code\u0026scope=email%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly%20openid%20profile%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fbanking.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fmerchant-setup-dashboard.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshopify-chat.admin.graphql%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Fflow.workflows.manage%20https%3A%2F%2Fapi.shopify.com%2Fauth%2Forganization-identity.manage\u0026state=ac7d8ee742a1df63238030c8be8fe424\u0026ui_locales=en\u0026ux=shop";
    </script>
</body>

</html>
Accepted Solution (1)
ShopifyDevSup
Shopify Staff
1323 218 459

This is an accepted solution.

Hi @gabriel_fu_200 👋

 

As noted in the auth doc here, all REST Admin API queries require a valid Shopify access token. Instead of your `api_key` and `api_password`, the header needs to include the access token as a `X-Shopify-Access-Token` header on all API queries like this:

 

 

Hope that helps! 

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1323 218 459

Hey @gabriel_fu_200 - this error looks like it's related to your app's OAuth authorization. Generally, this error will pop up if you haven't included your Shopify OAuth Access token in the header of your API Request. I'd recommend checking our documentation here to confirm that your OAuth settings are applied correctly. 

Usually, in Postman, it should look something like this:

 

If you can confirm that your X-Shopify-Access-Token value is the right one and is included in the headers, no worries - we're happy to keep help troubleshooting. If the info you're passing through the headers is correct and you still get this error, the next best thing is to reach out to our Partner Support Specialist team who can get in touch with one of our technical teams on your behalf to further troubleshoot.

 

Hope this helps!

 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

gabriel_fu_200
Shopify Partner
5 1 1

Hi, I have been putting the credential in the endpoint together which works fine for other api, i follows your way and put in the Headers Form now. But im getting the same response from shopify.

 

The key is already hidden at shopify admin panel, but I think i can confirm the key is correct as i use the same postman env for other API, like customer and product which return normal data.

 

Screenshot_13.png

 

Receiving the same response after putting the key in Headers Form.

Screenshot_14.png

 

Below is a product metafield api using the same postman environment

 

product_api.png

ShopifyDevSup
Shopify Staff
1323 218 459

This is an accepted solution.

Hi @gabriel_fu_200 👋

 

As noted in the auth doc here, all REST Admin API queries require a valid Shopify access token. Instead of your `api_key` and `api_password`, the header needs to include the access token as a `X-Shopify-Access-Token` header on all API queries like this:

 

 

Hope that helps! 

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog