How do I add a Shopify access scope to my task?
If you're reading this page, you might have encountered an error like this one:
The solution is usually found in task previews! Mechanic auto-applies access scopes as the need is demonstrated during task preview. If a scope is missing, it's usually because it wasn't used during task preview.
Debugging steps
Create a new task, subscribing to something like mechanic/user/trigger.
Copy in just the parts of your code that are using the scope(s) in question, without any if/else blocks.
Does the new task request the right scope(s)?
If yes: Great! This means that the problem can be solved at the level of task code, by making sure that the code you just tried is evaluated during task preview.
Tip: use preview events to reach event-specific parts of your task.
If no: Great! Export your new task (i.e. the one that's specifically focused on the issue), and send it to team@usemechanic.com, so a member of the platform team can take a look.
Important: the platform team can't help with debugging custom code, but they can help with platform issues. If you've reached this part, you might have found a platform issue!
Getting more help
The best place to compare code-level notes is our community Slack workspace. Join up, start a thread, and share your code in the new thread.
If your issue is time-sensitive, get help from a professional Mechanic partner.
Last updated