Skip to content

Update action to use Dev Dashboard apps#102

Merged
graygilmore merged 2 commits intomainfrom
gg-update-action-with-dev-dashboard
Mar 17, 2026
Merged

Update action to use Dev Dashboard apps#102
graygilmore merged 2 commits intomainfrom
gg-update-action-with-dev-dashboard

Conversation

@graygilmore
Copy link
Copy Markdown
Contributor

@graygilmore graygilmore commented Mar 11, 2026

Custom apps as we know them are being phased out. As of January 1, 2026 new custom apps cannot be created. Instead, apps need to be created through the Dev Dashboard. A big difference here is that the Dev Dashboard does not directly provide API tokens. Instead, you get a Client ID and Secret that you use to fetch short-lived tokens on the fly.

This PR updates this action to utilize those tokens if set as well as update the documentation. It also includes a bonus commit for a little fix to the order of operations to fix an exit code.

The exit code was captured after set -e, meaning $? always reflected the exit status of 'set -e' itself (always 0) rather than curl's exit code. This made the HTTP error check dead code — a failed curl would never trigger the error log. Move 'local exit_code="$?"' before 'set -e' so it captures curl's actual exit status, matching the correct pattern already used in fetch_access_token.
As of January 2026, Shopify no longer allows creating new custom apps. New apps are created through the Dev Dashboard and authenticated with a client_id + client_secret, which are exchanged for a short-lived access token via the client_credentials OAuth grant.

Changes: - action.yml: add client_id and client_secret inputs; mark access_token as legacy - entrypoint.sh: add fetch_access_token() that POSTs to /admin/oauth/access_token; replace the static auth block with a 4-branch resolver (client_id+secret preferred, partial-pair error, legacy access_token fallback, no-auth error); use ${VAR:-} syntax throughout to be safe under set -u - README.md: restructure auth docs with Dev Dashboard as the recommended path and legacy custom app as the secondary path; update primary usage example
@graygilmore graygilmore force-pushed the gg-update-action-with-dev-dashboard branch from 62ae80d to 98d4917 Compare March 11, 2026 18:18
@graygilmore graygilmore marked this pull request as ready for review March 11, 2026 21:48
@graygilmore graygilmore merged commit 2e5dcc8 into main Mar 17, 2026
3 checks passed
@graygilmore graygilmore deleted the gg-update-action-with-dev-dashboard branch March 17, 2026 23:55
@gab-umich
Copy link
Copy Markdown

Thanks for addressing this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Where to find the value of SHOP_ACCESS_TOKEN

4 participants