---
title: "Shopify Callback"
method: GET
path: "/api/shopify/callback"
tags: ["Shopify OAuth"]
---

# Shopify Callback

`GET /api/shopify/callback`

## Request

- Base URL: `https://api.soeru.biz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.soeru.biz/api/shopify/callback`
- Auth: none declared

Handle Shopify OAuth callback.

Shopify redirects here after user authorizes. We:
1. Verify HMAC signature
2. Verify state matches a pending auth request
3. Exchange authorization code for access token
4. Store the token in shop_settings
5. Redirect to frontend settings page

## Query parameters

- `code` string, required
- `shop` string, required
- `state` string, required
- `hmac` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/soeru/apis/soeru-api.md) · [All operations](https://skmtc.dev/soeru/apis/soeru-api/llms.txt) · [OpenAPI document](https://skmtc.dev/soeru/apis/soeru-api/revisions/63f8d371abed?raw)
