PrestaShop 9 Admin API: Getting Your First Token
PrestaShop 9 ships a new API for the back office, built on API Platform 3 with OAuth authentication. It replaces the older Web Services and is the intended path for integrations that need to read or change store data. Getting it working takes four steps — check the HTTPS requirement, create a client, fetch a token, make a request — and this guide walks through them with the exact menu paths and endpoints the project documents.
What the Admin API is, and what it is not
PrestaShop 9 introduces an API for the back office, built on API Platform 3 and using OAuth authentication. The project describes it as the replacement for the existing Web Services, which it calls outdated and expects to disappear from PrestaShop over the next few years.
Everything about it is back-office. Products, customers, orders, configuration — that is the surface it covers. It is the right tool for an ERP integration, a marketing tool syncing catalogue data, or an internal reporting job. It is not a public catalogue API for a headless storefront, and no amount of PrestaShop 9 changes that.
Two structural details matter before you write any code. The API runs on its own Symfony kernel,
separate from the back office, with its own configuration folder, its own cache folder and its own
entry point. And its endpoints all live under the /admin-api/ prefix, not the
/admin-dev/ one the back office uses.
Before you start: HTTPS is not optional in production
Production mode is strictly secured, and you need HTTPS to connect to the API. If you try to connect over plain HTTP on a live store, the API tells you to use HTTPS.
There is a setting for turning that check off, and you should know exactly what it is for before you touch it: go to Advanced Parameters, then Admin API, then Configuration, and disable "Force security in debug mode". That option only appears when debug mode is on, which you find under Advanced Parameters, then Performance. It exists so you can test against a local install. Turning it off on a production store removes a security control, so do it on staging and not on the shop customers use.
Make sure the API is switched on in that same Configuration page. If a connection fails and the token request looks correct, this is the first thing to check.
Create your first API client
Go to Advanced Parameters, then Admin API. You get a list of existing clients and a button to add one. The project's guidance is to create a separate client per integration, so a later revocation or rotation does not take down everything you have connected.
The form asks for six things:
- Client name — a label for you, such as "My ERP integration".
- Client ID — a unique identifier, written without spaces or special characters.
- Description — another note for yourself.
- Lifetime — how long an access token stays valid, in seconds.
- Enabled — an unenabled client cannot use the API at all.
- Scopes — the permissions this client gets. Several can be selected, and you adjust them later if the client needs more.
When you save, the client secret is generated and shown to you once. The documentation is explicit that you will not be able to see it again, so copy it before you navigate away. If you lose it, you generate a new client.
Scopes are also how the API stays extensible: new ones can be added, so permissions can stay granular rather than being all-or-nothing.
Get an access token
Send a POST request to /admin-api/access_token with the OAuth client credentials
grant. You pass four things: client_id, client_secret,
grant_type set to client_credentials, and scope[] repeated
once per permission your client has.
curl --location 'https://your-domain/admin-api/access_token' \
--form 'grant_type="client_credentials"' \
--form 'client_id="your_client_id"' \
--form 'client_secret="your_client_secret"' \
--form 'scope[]="product_read"' \
--form 'scope[]="customer_group_read"'
A successful response gives you a token type, an expiry in seconds, and the access token itself. The token is a JWT — a JSON Web Token containing information about the client and the scopes it can use, signed with a secret key so it cannot be tampered with.
Send it on every following request in the Authorization header, prefixed with
Bearer. The token expires, so anything you build has to obtain a fresh one rather than
storing one forever.
The authorization server is built into the API itself, but it is modular and can be replaced with another OAuth2 implementation such as Keycloak if your setup needs one.
Make your first request
With a token in hand, endpoints follow the same shape: a resource path under
/admin-api/, and the token in the header.
curl --location 'https://your-domain/admin-api/customers/group/1' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
To change a resource, send a PUT to the same path with a Content-Type: application/json
header and the fields you want to change in the body. To create one, POST to the collection path. To
remove one, DELETE the item path. The new resource appears in the back office immediately, because
the API and the back office read the same data.
Two failure responses are worth recognising. A missing resource returns a not-found error naming the type it could not find, which usually means the ID is wrong. A missing permission returns a 403 with an invalid scope message, which means the token was issued without the scope that endpoint needs.
Scopes are the permission model
Scopes are what make this safe to hand to an integration. A client created only with read scopes cannot write, and the token carries exactly the permissions it was issued with — a token generated before you widened the client's scopes still only works with the original set.
That last point causes the most confusion. Widening a client's scopes does not widen the tokens already in circulation. Request a new token after any change to scopes.
The reference for what exists is generated for you: the documentation URL is shown in the back office under Advanced Parameters, Admin API, and lists every endpoint, method and parameter. An OpenAPI collection is served in JSON format, which imports straight into Postman or a similar tool so you can explore endpoints without writing requests by hand.
Where to go next
The rest of the PrestaShop 9 cluster:
- What changed in PrestaShop 9, and the 8 versus 9 comparison
- Module compatibility: what breaks on PrestaShop 9
- PrestaShop system requirements
FAQ
Is the PrestaShop 9 Admin API a headless storefront API? No. It is a back-office API covering products, orders, customers and configuration. It replaces the older Web Services, which were also back-office. If you want a customer-facing catalogue API for a headless front end, this is not it.
Can I use the Admin API over plain HTTP? Not in production. Production mode is strictly secured and requires HTTPS. The TLS check can only be relaxed with debug mode enabled, and it is meant for local testing, not for a live store.
Where do I create an API client in the back office? Advanced Parameters, then Admin API. That page lists existing clients and lets you add one. The same menu holds a Configuration page where the API itself is switched on.
I lost my client secret. Can I see it again? No. The secret is shown once when you generate it and cannot be retrieved afterwards. If you lose it you have to generate a new client.
What does an access token look like and how long does it last? It is a JWT, returned as a bearer token with a token type and an expiry in seconds. You send it in the Authorization header as Bearer followed by the token. It expires, so your integration has to fetch a new one.
What happens if I request an endpoint without the right scope? You get a 403 with an invalid scope message. Scopes are assigned to the client when you create it, and each endpoint requires specific ones, for example product_read for the products endpoint.
Where do I find the full list of endpoints? The documentation is generated automatically and its URL is shown in the back office under Advanced Parameters, Admin API. An OpenAPI collection is also served in JSON format, which imports directly into Postman and similar tools.
Is the Admin API finished? Not quite. The project describes it as still under development and invites testing and feedback. Treat it as stable enough to integrate against, but check the release notes for each patch version before relying on a specific endpoint.
About this guide
Written by Frank Kenedy, who runs PrestaSOO and fixes PrestaShop stores for a living. Last updated on 2026-10-04.
Sourcing: the menu paths, field names, endpoint paths, grant type and error responses in this guide come from two PrestaShop sources read on 2026-10-04 — the 9.0 core-updates notes, which describe the Admin API kernel, its app id and its configuration folder, and the project's own Admin API walkthrough. No token, secret or credential is reproduced here; placeholders are shown instead.
Was this page helpful?
Countdown x Bar
Xleft
Jump to Checkout
Accessibility Guard
SOO Agent Gateway
SOO Agent Catalog Tools
SOO Agent SEO Tools
GDPR
