Shopeak
Developers / Apps & agents

Platform

Apps & agents

Beta

Register 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

We may add tools, scopes and response fields as this grows. If something doesn’t work the way this page says, email info@shopeak.co.ke.

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?

If you’re building something other than an AI agent, such as a stock sync or an accounting export, email info@shopeak.co.ke and tell us what you need.

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.

  1. You register your app

    You choose the scopes your app may ask for and get a Client ID and Client Secret.

  2. 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.

  3. 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.

  4. Shopeak sends them back with a code

    Your server swaps the code for an access token and a refresh token.

  5. 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.

FieldDescription
Name2 to 40 characters, shown on the consent screen. It must be unique on Shopeak, and some names, such as Shopeak’s own, are reserved.
DescriptionUp to 300 characters about what your app does.
LogoPNG or JPEG, up to 1 MB, between 64 and 512 pixels on each side. Shopeak converts it to PNG.
WebsiteYour app’s home page.
Privacy policy URLRequired if your app asks for customers.read.
Support emailWhere store owners can reach you. Required if your app asks for customers.read.
Redirect URIsUp 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.
PermissionsThe 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.

  1. Add a logo, website URL, privacy policy URL and support email to your app.
  2. On the app’s card in Apps & agents, tap Request verification. You can add a short note for the team.
  3. 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.
  4. 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:

ScopeLets the agentThe person needs
store.readSee the store’s name, logo, contact details and policies.Any member of the store
store.writeChange the store’s description, contact details and policies.Manage settings
products.readSee products, prices and descriptions.Manage inventory
products.writeAdd products, change titles, descriptions and prices, and archive products after the person confirms. It can’t delete anything.Manage inventory
inventory.readSee how much stock there is of each product.Manage inventory
inventory.writeAdjust stock levels.Manage inventory
orders.readSee orders, their items and their status.Manage orders
orders.writeFulfil orders, add notes, and cancel orders after the person confirms.Manage orders
customers.readSee customers’ names and contact details.View customers
analytics.readSee sales totals and performance figures.View analytics
  • A .write scope includes its .read scope, so products.write also gives products.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.

ScopeDescription
openidAdds an ID token to the token response, saying who connected the store.
profileThe person’s name in the ID token.
emailThe person’s email address, in the ID token and as email in the token response.
offline_accessAccepted 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 scope in 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_basic or client_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:

Authorization request
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
NameTypeDescription
client_idRequiredstringYour Client ID, which starts with app_.
redirect_uriRequiredstringMust exactly match one of your registered redirect URIs.
response_typeRequiredstringAlways code.
scopeRequiredstringSpace-separated scopes, all registered for your app. Include at least one store scope.
stateRequiredstringA random value you check when the person comes back. Up to 1,024 characters.
code_challengeRequiredstringThe PKCE challenge: the base64url SHA-256 hash of your code verifier.
code_challenge_methodRequiredstringAlways S256. plain isn’t accepted.
resourceOptionalstringThe Seller MCP URL, https://seller-mcp.shopeak.co.ke/mcp. Optional, but if you send it, it must match exactly.
nonceOptionalstringEchoed 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:

Callback
https://yourapp.example/shopeak/callback
  ?code=...
  &state=K7pV3xQ9...
  &iss=https%3A%2F%2Fapi.shopeak.co.ke
  • Check that state matches the one you stored, and that iss is https://api.shopeak.co.ke.
  • If the person declined, you get error=access_denied instead 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

Token request
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#

Token response
{
  "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"
}
FieldTypeDescription
access_tokenstringSend it to the Seller MCP. Treat it as opaque: its format may change.
token_typestringAlways Bearer.
expires_inintegerSeconds until the access token expires: 900 (15 minutes).
refresh_tokenstringGets a new access token. You get a new refresh token every time, so always store the latest one.
scopestringThe scopes this token actually carries. It can be fewer than you asked for, so check it.
workspace_namestringThe name of the connected store, for showing in your app.
id_tokenstringOnly when you asked for openid, and only on the first exchange.
emailstringOnly when the email scope was granted.

Refreshing

Refresh request
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 scope to 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:

Revoke request
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.

ErrorDescription
invalid_requestA parameter is missing or wrong, such as no PKCE challenge, an unregistered redirect URI or an unknown Client ID.
invalid_clientThe Client ID or secret is wrong, or you used more than one way to send them.
unauthorized_clientShopeak has suspended your app.
invalid_grantThe 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_scopeA scope is unknown or not registered for your app, or no store scope was requested.
invalid_targetThe resource doesn’t match the Seller MCP.
access_deniedThe person declined, or they can’t act for that store.
unsupported_grant_typeOnly authorization_code and refresh_token are supported.
server_errorSomething went wrong on Shopeak’s side. Try again later.
temporarily_unavailableShopeak 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: Bearer header 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.
First request
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 401 with a WWW-Authenticate header 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.

ToolWhat it doesScope
get_connectionWho the connection acts for: the store, the person and their role, your app and the permissions granted. Call it first.Any
get_storeThe store profile: name, tagline, description, category, city, contacts, policies and social links.store.read
update_storeChange store profile details. Send only the fields to change.store.write
list_productsProducts, newest first, with prices, stock and status. Filter by text, status or low stock.products.read
get_productOne product with its variants, prices, stock per location and status.products.read
create_productCreate a simple product without variants. It’s a draft unless you set it active.products.write
update_productChange a product’s details, price, compare-at price, status or variant prices.products.write
archive_productHide a product from the store. Needs the person’s confirmation. It can be restored in Shopeak.products.write
set_stockSet the available quantity of a product, a variant or one location.inventory.write
list_ordersOrders, newest first, with status, payment and totals. Filter by status, text or date.orders.read
get_orderOne order with items, totals, delivery and history. Customer details need customers.read.orders.read
fulfill_orderMark the store’s items in an order as fulfilled.orders.write
cancel_orderCancel a pending or confirmed order. Needs the person’s confirmation. Paid orders aren’t refunded automatically.orders.write
add_order_noteAdd an internal note to an order. Customers don’t see it.orders.write
search_customersFind customers by name, email or phone.customers.read
list_reportsThe sales, stock and customer reports this connection may run.analytics.read, inventory.read or customers.read
run_reportRun 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_token that 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 the confirmation_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:

  1. Register an app for the client

    Add the client’s OAuth callback URL as a redirect URI, and choose the scopes it needs.

  2. 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.

  3. 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 401 within 30 seconds, and your next refresh fails with invalid_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 state for every connection, and check iss on 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.