Platform
Apps & agents
BetaRegister an app, then let store owners connect it to their Shopeak store. Your AI agent works on their behalf, with only the permissions they hold and only the ones they approve.
Where things stand#
Everything on this page is live, and any Shopeak store can connect your app:
- Register an app
- LiveIn the Shopeak Seller app, under Settings, Apps & agents. You get a Client ID and Client Secret straight away.
- Connect a store
- Live OAuth 2.0 with PKCE. The store owner signs in to Shopeak and approves your app on the consent screen.
- Seller MCP
- Live At
https://seller-mcp.shopeak.co.ke/mcp, with 17 tools for the store, products, stock, orders, customers and reports. - Connected apps
- LiveStore owners see every connected app, review what it did and disconnect it, under Settings, Apps & agents, Connected.
New and in beta
MCP or REST?#
Both, for different jobs:
- Connecting uses OAuth 2.0 over REST. Your app sends the store owner to Shopeak to sign in and approve, then swaps the code for tokens at the token endpoint. This is the standard authorization code flow, so any OAuth 2.0 client library works.
- Working on the store uses the Seller MCP. Your agent calls the Seller MCP with the access token to read and update the store. It’s a separate server from the public Shopeak MCP.
- Helping shoppers needs no app. The public Shopeak MCP lets any agent search stores, build a cart and check out as a guest, without registering or signing in.
Need a REST API for your store instead?
How it works#
It works like delegated permissions in Microsoft Graph or Google Workspace: the agent acts as the person who connected it, never as more.
You register your app
You choose the scopes your app may ask for and get a Client ID and Client Secret.
A store owner clicks “Connect Shopeak” in your app
Your app sends them to Shopeak, where they sign in. Your app never sees their password.
Shopeak asks for their consent
The consent screen shows your app’s name and logo, the store, and each permission in plain words. Permissions they don’t hold themselves are shown as unavailable. They can untick anything they don’t want to give.
Shopeak sends them back with a code
Your server swaps the code for an access token and a refresh token.
Your agent works on the store
It calls the Seller MCP with the access token, which lasts 15 minutes, and uses the refresh token to get new ones. Every action is logged for the store owner to review.
Register an app#
Open the Shopeak Seller app and go to Settings, then Apps & agents, then Create app. Only a store’s owner can register apps, and you don’t need a separate developer account.
| Field | Description |
|---|---|
Name | 2 to 40 characters, shown on the consent screen. It must be unique on Shopeak, and some names, such as Shopeak’s own, are reserved. |
Description | Up to 300 characters about what your app does. |
Logo | PNG or JPEG, up to 1 MB, between 64 and 512 pixels on each side. Shopeak converts it to PNG. |
Website | Your app’s home page. |
Privacy policy URL | Required if your app asks for customers.read. |
Support email | Where store owners can reach you. Required if your app asks for customers.read. |
Redirect URIs | Up to 5. Each must use https, except http://localhost, 127.0.0.1 and [::1] for local testing. No wildcards, fragments, IP addresses or user names and passwords in the URL. |
Permissions | The scopes your app may ever ask for. Store owners can approve fewer, never more. |
When you create the app, you get:
- A Client ID, like
app_3f9c2a7d1b8e4c6a5d0f2e91. It’s public, so it’s fine to include in URLs. - A Client Secret, which starts with
shs_. It’s shown only once, so copy it somewhere safe. If you lose it, create a new one.
Rotating the secret
An app can have two active secrets at a time. To rotate without downtime, create a new secret, deploy it, then revoke the old one. The Seller app shows when each secret was last used.
Getting verified
Verified apps show a Verified by Shopeak badge on the consent screen, so store owners know the Shopeak team has checked who is behind them. The badge doesn’t change what an app can access.
- Add a logo, website URL, privacy policy URL and support email to your app.
- On the app’s card in Apps & agents, tap Request verification. You can add a short note for the team.
- The Shopeak team checks that the website, privacy policy and redirect URIs belong to the same business, and that the scopes match what the app does.
- The card shows the result: the badge, or a note telling you what to fix before you ask again.
Changing a verified app’s name, logo, website, redirect URIs or scopes removes the badge until it’s reviewed again.
Good to know
- Each owner can register up to 10 apps, and create up to 5 in an hour.
- If you remove a scope from your app, connections lose it the next time they refresh. A connection left with no store scopes ends.
- Deleting an app, or Shopeak suspending it, disconnects it from every store straight away.
Scopes#
Scopes are the permissions your app asks for. Each one maps to a permission the person must hold in Shopeak:
| Scope | Lets the agent | The person needs |
|---|---|---|
store.read | See the store’s name, logo, contact details and policies. | Any member of the store |
store.write | Change the store’s description, contact details and policies. | Manage settings |
products.read | See products, prices and descriptions. | Manage inventory |
products.write | Add products, change titles, descriptions and prices, and archive products after the person confirms. It can’t delete anything. | Manage inventory |
inventory.read | See how much stock there is of each product. | Manage inventory |
inventory.write | Adjust stock levels. | Manage inventory |
orders.read | See orders, their items and their status. | Manage orders |
orders.write | Fulfil orders, add notes, and cancel orders after the person confirms. | Manage orders |
customers.read | See customers’ names and contact details. | View customers |
analytics.read | See sales totals and performance figures. | View analytics |
- A
.writescope includes its.readscope, soproducts.writealso givesproducts.read. - Every request must include at least one store scope.
- Nothing can be deleted through an app. An agent can archive a product, which hides it and can be undone in Shopeak, or cancel an order, and both always need the person to confirm first.
Identity scopes
These say who connected the store. They don’t give any access to the store.
| Scope | Description |
|---|---|
openid | Adds an ID token to the token response, saying who connected the store. |
profile | The person’s name in the ID token. |
email | The person’s email address, in the ID token and as email in the token response. |
offline_access | Accepted but not needed. Every connection gets a refresh token whether you ask for it or not. |
Permissions follow the person#
An agent never gets more access than the person who connected it. Store owners hold every permission. Staff can connect apps too, but only with the permissions their role gives them.
- Shopeak checks the person’s current permissions every time it issues or refreshes a token, so
scopein a token response can be smaller than what was approved. - If a staff member loses a permission, the agent loses the matching scope at the next refresh. If they leave the store, the connection ends.
- If the same person connects your app again, the new connection replaces the old one.
Connect a store#
- Issuer
https://api.shopeak.co.ke- Metadata
https://api.shopeak.co.ke/.well-known/oauth-authorization-server- Authorize
https://api.shopeak.co.ke/api/v1/oauth/authorize- Token
https://api.shopeak.co.ke/api/v1/oauth/token- Revoke
https://api.shopeak.co.ke/api/v1/oauth/revoke- Client authentication
client_secret_basicorclient_secret_post. Use one per request, not both. Keep the secret on your server, never in a browser or mobile app.
1. Send the person to Shopeak
Create a random state and a PKCE code verifier, store both against the person’s session, then redirect them to the authorize endpoint:
https://api.shopeak.co.ke/api/v1/oauth/authorize
?client_id=app_3f9c2a7d1b8e4c6a5d0f2e91
&redirect_uri=https%3A%2F%2Fyourapp.example%2Fshopeak%2Fcallback
&response_type=code
&scope=store.read%20products.write%20orders.read
&state=K7pV3xQ9...
&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
&code_challenge_method=S256
&resource=https%3A%2F%2Fseller-mcp.shopeak.co.ke%2Fmcp| Name | Type | Description |
|---|---|---|
client_idRequired | string | Your Client ID, which starts with app_. |
redirect_uriRequired | string | Must exactly match one of your registered redirect URIs. |
response_typeRequired | string | Always code. |
scopeRequired | string | Space-separated scopes, all registered for your app. Include at least one store scope. |
stateRequired | string | A random value you check when the person comes back. Up to 1,024 characters. |
code_challengeRequired | string | The PKCE challenge: the base64url SHA-256 hash of your code verifier. |
code_challenge_methodRequired | string | Always S256. plain isn’t accepted. |
resourceOptional | string | The Seller MCP URL, https://seller-mcp.shopeak.co.ke/mcp. Optional, but if you send it, it must match exactly. |
nonceOptional | string | Echoed in the ID token when you ask for openid. Up to 256 characters. |
Shopeak asks the person to sign in if they aren’t already, then shows the consent screen with your app’s name, logo and the permissions you asked for.
2. Handle the callback
Shopeak sends the person back to your redirect URI:
https://yourapp.example/shopeak/callback
?code=...
&state=K7pV3xQ9...
&iss=https%3A%2F%2Fapi.shopeak.co.ke- Check that
statematches the one you stored, and thatissishttps://api.shopeak.co.ke. - If the person declined, you get
error=access_deniedinstead of a code. - The code works once and expires after 2 minutes. If it’s used twice, Shopeak ends the connection it created.
3. Swap the code for tokens
curl https://api.shopeak.co.ke/api/v1/oauth/token \
-u "$SHOPEAK_CLIENT_ID:$SHOPEAK_CLIENT_SECRET" \
-d grant_type=authorization_code \
-d code="$CODE" \
-d redirect_uri=https://yourapp.example/shopeak/callback \
-d code_verifier="$CODE_VERIFIER"Tokens#
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6ImF0K2p3dCJ9...",
"token_type": "Bearer",
"expires_in": 900,
"refresh_token": "shopeak_rt_v1...",
"scope": "store.read products.read products.write orders.read",
"workspace_name": "Mama Mary Vegies"
}| Field | Type | Description |
|---|---|---|
access_token | string | Send it to the Seller MCP. Treat it as opaque: its format may change. |
token_type | string | Always Bearer. |
expires_in | integer | Seconds until the access token expires: 900 (15 minutes). |
refresh_token | string | Gets a new access token. You get a new refresh token every time, so always store the latest one. |
scope | string | The scopes this token actually carries. It can be fewer than you asked for, so check it. |
workspace_name | string | The name of the connected store, for showing in your app. |
id_token | string | Only when you asked for openid, and only on the first exchange. |
email | string | Only when the email scope was granted. |
Refreshing
curl https://api.shopeak.co.ke/api/v1/oauth/token \
-u "$SHOPEAK_CLIENT_ID:$SHOPEAK_CLIENT_SECRET" \
-d grant_type=refresh_token \
-d refresh_token="$REFRESH_TOKEN"- Each refresh returns a new refresh token, and the old one stops working. If a refresh fails on the network, you can retry with the same token for up to 60 seconds.
- Using an old refresh token after that ends the connection, because it may have been stolen.
- You can send
scopeto ask for fewer scopes. You can never get more than the person approved. - A refresh token expires after 30 days without use. After 180 days the person needs to connect again, even if you’ve been refreshing.
Disconnecting
When the person disconnects Shopeak in your app, revoke either token. This ends the whole connection:
curl https://api.shopeak.co.ke/api/v1/oauth/revoke \
-u "$SHOPEAK_CLIENT_ID:$SHOPEAK_CLIENT_SECRET" \
-d token="$REFRESH_TOKEN"Errors#
Errors follow OAuth 2.0: an error code and an error_description you can log. On the authorize step they come back to your redirect URI. If the Client ID or redirect URI itself is wrong, Shopeak shows the error to the person instead, because it can’t trust the redirect.
| Error | Description |
|---|---|
invalid_request | A parameter is missing or wrong, such as no PKCE challenge, an unregistered redirect URI or an unknown Client ID. |
invalid_client | The Client ID or secret is wrong, or you used more than one way to send them. |
unauthorized_client | Shopeak has suspended your app. |
invalid_grant | The code or refresh token is invalid, expired or already used, or the person lost the access the connection depended on. Ask them to connect again. |
invalid_scope | A scope is unknown or not registered for your app, or no store scope was requested. |
invalid_target | The resource doesn’t match the Seller MCP. |
access_denied | The person declined, or they can’t act for that store. |
unsupported_grant_type | Only authorization_code and refresh_token are supported. |
server_error | Something went wrong on Shopeak’s side. Try again later. |
temporarily_unavailable | Shopeak couldn’t check the person’s access just then. Try again shortly. |
Seller MCP#
The Seller MCP is where your agent does its work. It uses Streamable HTTP, like the public Shopeak MCP, and is a separate server from it.
- URL
https://seller-mcp.shopeak.co.ke/mcp- Authentication
- The access token in an
Authorization: Bearerheader on every request. - Resource metadata
https://seller-mcp.shopeak.co.ke/.well-known/oauth-protected-resource/mcp- Rate limit
- 240 requests a minute per connection. Over it, you get 429 and a Retry-After.
curl https://seller-mcp.shopeak.co.ke/mcp \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"your-app","version":"1.0.0"}}}'- A missing, expired or revoked token gets
401with aWWW-Authenticateheader pointing at the resource metadata. Refresh the token and try again, or ask the person to connect again. - Every tool call is checked against the connection and the person’s current permissions in Shopeak, so a disconnect or a changed role takes effect on the next call.
- Each call is recorded in the store’s activity log, with who, what and when.
Tools
tools/list only returns the tools your token’s scopes allow, so two connections can see different lists.
| Tool | What it does | Scope |
|---|---|---|
get_connection | Who the connection acts for: the store, the person and their role, your app and the permissions granted. Call it first. | Any |
get_store | The store profile: name, tagline, description, category, city, contacts, policies and social links. | store.read |
update_store | Change store profile details. Send only the fields to change. | store.write |
list_products | Products, newest first, with prices, stock and status. Filter by text, status or low stock. | products.read |
get_product | One product with its variants, prices, stock per location and status. | products.read |
create_product | Create a simple product without variants. It’s a draft unless you set it active. | products.write |
update_product | Change a product’s details, price, compare-at price, status or variant prices. | products.write |
archive_product | Hide a product from the store. Needs the person’s confirmation. It can be restored in Shopeak. | products.write |
set_stock | Set the available quantity of a product, a variant or one location. | inventory.write |
list_orders | Orders, newest first, with status, payment and totals. Filter by status, text or date. | orders.read |
get_order | One order with items, totals, delivery and history. Customer details need customers.read. | orders.read |
fulfill_order | Mark the store’s items in an order as fulfilled. | orders.write |
cancel_order | Cancel a pending or confirmed order. Needs the person’s confirmation. Paid orders aren’t refunded automatically. | orders.write |
add_order_note | Add an internal note to an order. Customers don’t see it. | orders.write |
search_customers | Find customers by name, email or phone. | customers.read |
list_reports | The sales, stock and customer reports this connection may run. | analytics.read, inventory.read or customers.read |
run_report | Run a report, such as sales summaries, top products, low stock or sales velocity. | analytics.read, inventory.read or customers.read |
Confirming changes
archive_product and cancel_order never run on the first call.
- If your MCP client supports elicitation, the Seller MCP asks the person to confirm directly, and carries on only if they say yes.
- Otherwise the tool returns a summary and a
confirmation_tokenthat lasts a few minutes. Show the person the summary, and only if they clearly agree, call the same tool again with the same arguments and theconfirmation_token. - Your agent must never confirm on the person’s behalf.
Using it from an MCP client
MCP clients that support the MCP authorization spec can find everything from the 401 response: the resource metadata names https://api.shopeak.co.ke as the authorization server. Shopeak doesn’t support dynamic client registration, so:
Register an app for the client
Add the client’s OAuth callback URL as a redirect URI, and choose the scopes it needs.
Add the server to the client
Use
https://seller-mcp.shopeak.co.ke/mcp, and enter your Client ID and Client Secret where the client asks for them.Connect
The client opens Shopeak for the person to sign in and approve, then calls the tools with the token it gets back.
What store owners control#
In the Shopeak Seller app, under Settings, Apps & agents, Connected:
- Consent. They see exactly what your app asks for and can approve less.
- Activity. Every action your agent takes through the Seller MCP, with who, what and when, alongside every connection and disconnection.
- Disconnect at any time. The connection ends straight away: your agent’s next tool call fails, the Seller MCP answers
401within 30 seconds, and your next refresh fails withinvalid_grant.
Staff see and disconnect only their own connections. The store owner sees all of them.
Security checklist#
- Keep the Client Secret on your server, and never commit it to source control.
- Always use PKCE and a fresh
statefor every connection, and checkisson the callback. - Ask only for the scopes you need. A shorter list is easier to approve.
- Store refresh tokens encrypted, save the new one after every refresh, and delete them when the person disconnects.
- Rotate your secret straight away if you think it has leaked.
- Have your agent confirm with the person before any change they might not expect.
Get help#
Questions, or something not working? Email info@shopeak.co.ke with:
- Your Client ID. Never send your Client Secret or tokens.
- What you tried, and the error code and description you got back.
Questions or feedback about these docs? Email info@shopeak.co.ke.