Mini Not Found on useGenerateUserToken

Hi,

While trying to get the user token (to be then verified on the server) we encountered an error: Failed to generate minis user token Error: Mini not found

The Mini was generated, we used the setup command, verified the manifest, made sure the API key was set in the .env (under the SHOP_MINIS_API_KEY variable).

I have also tried to generate another api key to make sure we have the latest (as we updated the manifest after generating the key, to make sure), and have encountered the same issue.

PS C:\Users\ofekt\projects\shopify-minis\vibe-arcade> npx shop-minis api-keys list
╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Available API keys                                                          │
│                                                                              │
│  Title: initial                                                              │
│  Created: 2025-11-11T12:52:57Z                                               │
│  Last used: 2025-11-25T10:36:20Z                                             │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

PS C:\Users\ofekt\projects\shopify-minis\vibe-arcade> npx shop-minis api-keys generate
╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Error generating API key                                                    │
│                                                                              │
│  Mini not found                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Everything else works, from pulling the products on the mini and sending the mini for submission.

Thank you
Ofek

I think to solve this issue, you need to let Shop renew your Minis handle.
What I did is delete the handle line in manifest.json then set up the mini again, you can try

Amazing, thank you!
I deleted the handle, and the API Key, and rerun the setup command, it generated the handle and added a new key to the .env
Then I could get the user generated token.

One thing I do want to note is that regenerating the API key and handle, I noted the submission I sent was no longer there, it is visible under the old api key.

So the actual issue was changing the handle, and it needs to match the API Key - I had changed the handle a few days ago, when now I reverted the change it indeed worked.

Please do not remove your handle to generate a new api key - this creates a new duplicated mini - instead use the api-keys generate command

Edit: that command does not work as I thought - please see this comment for the latest advice How to get SHOP_MINIS_API_KEY for .env? - #14 by steve-t-shopify