Emporix Auth
Use the emporix-auth skill to choose Emporix token types, request tokens, pick scopes, and interpret 401 and 403 responses.
Use the emporix-auth skill to authenticate against the Emporix Commerce Engine API. It helps you pick the right token type, compose OAuth requests, choose minimal scopes, and diagnose 401 or 403 responses from api.emporix.io.
Skill details
Skill name
emporix-auth
Package path
skills/emporix-auth/ (contains SKILL.md)
Install it once using Installing skills.
When to use it
Use this skill when you need to:
Obtain or choose between Emporix token types (service access, anonymous, customer, SSO / token exchange, B2B legal-entity, MCP)
Compose OAuth token requests for integrations
Select minimal scopes for an API key or integration
Diagnose
401or403responses from anyapi.emporix.ioendpointConnect an AI tool to the hosted Emporix MCP server with the right MCP token packaging
How it works
Every Emporix API call is authorized with an OAuth 2.0 bearer token, except for MCP URL packaging, which embeds API key material. Endpoints declare which scopes the token must carry. The platform uses different token types for machine integrations, storefront guests, logged-in customers, and SSO.
Walk the decision tree top-down; the first match wins. Base URL for token and API calls: https://api.emporix.io. Tenant names are lowercase.
Service access
Backend, scripts, and CI. A machine caller uses the client_credentials grant.
MCP
Hosted Emporix MCP server URL. The value is Base64 of the custom API key clientId:secret (not an OAuth access token).
Anonymous
Storefront guest session; returns sessionId for cart continuity
Customer
Storefront email/password login; authorize login with the anonymous bearer token first
SSO / token exchange
External IdP. Use Emporix-managed authorization code or client-owned token exchange. Do not mix them.
B2B (after customer or SSO)
Refresh the customer token with legalEntityId so the company context is embedded in the token
Prerequisites
Before you use this skill, make sure you have:
Emporix API credentials (Client ID and Secret) and, for storefront flows, Storefront API credentials (Client ID)
A custom API key with only the scopes your integration needs – recommended for production
A clear call pattern (backend, storefront, SSO, or MCP) so you can pick the matching token type
How to use it
After install, work in your AI tool with natural-language requests. Examples:
Get a service access token with only
currency.currency_readfor tenantmytenant.
Which token type do I need for a storefront guest who later logs in?
Why do I get
403on this product update when my token call returned200?
Build an MCP server URL for the product domain with the right scopes.
Provide your tenant name (lowercase), Client ID/Secret source, and the endpoint or MCP domain you are calling.
Usage notes
Request explicit scopes on service tokens in production. Omitting
scopegrants every scope on the API key.Service access tokens have no usable refresh token. When they expire, request a new one. Confirm tenant binding via
tenant=in the token responsescopestring.An MCP token packages a custom key that carries the MCP scope plus tool scopes; missing tools usually mean missing scopes on the key.
The MCP server URL contains one of the domains
product,order,customer,extensibility,frontend, orimporttool, or the ID of a dynamic server you created in AI MCPs. The old domainfrontend-facingreturns404.A
401from the MCP server means the key has no MCP scope, or the tenant or credentials in the URL are wrong. Check the tenant and the Base64 token first, then create a custom key that carries the MCP scope if it is missing. Treat the MCP URL as a credential. See Retrieving Emporix MCP Token.Custom API key scopes are fixed at creation. You cannot add scopes later; create a new key if needed. Some scopes cannot be attached to API keys at all. If a scope is not offered in the portal, contact Emporix Support.
Requesting a scope the key does not carry still returns
200; the missing scope is silently absent from the granted set. Always read back thescopefield.Prefer
_readover_manage, and_ownor type-specific scopes over tenant-wide ones. Take required scopes from each endpoint’s API reference. Do not invent scope names.For SSO access, choose either Emporix-managed authorization code or token exchange. Never use both in one implementation.
Checking status codes
Invalid ApiKey when requesting a token
Gateway rejected client_id before OAuth
Confirm the Client ID in Developer Portal → Manage API Keys. Check the key is for the right environment and is not revoked.
401 Unauthorized
Token rejected
Check whether the token has expired. Confirm you are using the right token type for the endpoint. Compare the {tenant} in the URL with tenant= in the token scope string.
403 Forbidden
Valid token, missing scope
Compare the scopes granted on the token with the endpoint’s API reference. If a scope you requested is missing from the grant, create a new API key that includes it.
Last updated
Was this helpful?

