I’m currently trying out to duplicate a pdp theme template via custom app (part of a bigger feature). To do so, I believe this Rest API reference should do the thing: Reference Link
I believe these are the only requirements needed for it to work:
write_themes scope added
API version set to 2024-01
I have also tested it in POSTMAN and I can verify that it works using the Develop App credentials. However, for our React/Remix custom app, it doesn’t.
Given example is for test sake. When submit is executed, it should create a pdp theme template based from the templates/product.json which by default exists. However, what I’m getting is 404.
This request for access should only be required if your app is a public app - and it should not apply to custom apps. Will connect with our internal dev team to try to understand why this is happening.
Still looking into this, are you 100% certain that the credentials you are using in Postman to successfully make a PUT request to the Asset API are the same as the one that is failing in the remix app?
I think I have mentioned in one of my reply that I was using a Develop App’s credentials in postman (the one that you can create via “Apps and sales channels” option in the settings). So I believe it is using a different one than the remix app.
Okay - I think that may be the issue, it’s very possible that the credentials that you’re using on the remix app is associated with an app that is not set up as a custom app. You may need to connect with our partner support team to look into this app specifically to confirm.
Hello @CharlesMoreno and @Liam , there are any news on the Assets API PUT Remix app?
I’m encountering the same issue.
We have developed an app that relies on AssetsApi, it is already in production. It has the exemption to use the AssetsAPI.
For now, the production app works, but on local environment it does not work anymore, even trying to downgrade version of the shopify-api, I tried 2023-01, 2023-10, and 2024-01.
Assets API for the GET works fine.
There is no doubt that the API request is well written, as it is the same a per Shopify’s documentation and also, is the same as the one in Prod which is currently working, and no changes were done.
Let me know, anything that could be helpful. Thank you!
I feel bad that you’re encountering the same but that’s great to know that I’m not the only one that’s having this problem. I already escalated this issue via sending a support ticket in the Shopify Partner dashboard. I already gave them all the essential information that they need and just waiting for their response about it.
While I’m in the process of giving them more information about the problem that we’re facing. My last test without changing anything seems to have worked already. I was able to create/modify assets using the Assets API in the Remix App.
I already asked for a confirmation whether they released a fix for it already. Let me know if it is the same on your end.
Hi @CharlesMoreno , fantastic news for you.
I just tested and unfortunately for me it is not yet working. Now I’m wondering why it works for you. Maybe ApiVersion or node package.
I’m using 2024-01 on shopify.server.ts and I’m also using new admin.rest.resources.Asset({ session }) to then asset.save(), one thing that is worth to check with you is the package version:
“@shopify/shopify-api”: “^9.0.1” → which scaffolds the 9.0.2
I just noticed from your screenshot that you’re still getting a 404 error rather than 422. Have you tried to check your Shopify Partner App if it’s already distributed as a custom app? You can do so by going to the “Distribution” then choose “Custom Distribution”. Take note that this does not entirely resolve your issue.
After that, your app should have a “Custom App” tag when viewed in the apps list. With that, the error changed from 404 to 422 to me. Will update you soon once I hear back from the support of why we’re still getting these errors.