- Documentation
- API · Version 1.0
- Authentication
Authentication
On this page
The API authenticates an application, not a person. Each client application receives a public identifier and a secret, which it presents using HTTP Basic authentication on every request.
Getting credentials
An API client belongs to a workspace and, where applicable, to a single brand of that workspace. It carries a list of scopes that decides what it can do.
Keys are created in the dashboard, menu Clés API (API keys), open to the workspace's administrators and owner: Créer une clé API (Create an API key), then a Nom (Name), the Marque (Brand) — or "Tout l'espace de travail" (The whole workspace) — and the Droits (Rights). The full walkthrough is in the guide.
- The identifier starts with
qsc_, the secret withqss_. - The secret is shown only once, at creation. Only its hash is kept: it cannot be read again, and losing it means creating a new key.
- Store it in a secrets manager or an environment variable, never in source code.
- A key revoked from the dashboard loses access from its next request, and cannot be reactivated.
Presenting the credentials
The identifier is the username, the secret is the password:
curl https://quietsocial.dev/api/v1/me \
-u "qsc_a1b2c3d4e5f6g7h8i9j0k1l2:qss_…"
Which amounts to sending the header:
Authorization: Basic base64(identifier:secret)
The same credentials are also accepted as a bearer token, in clear, separated by a colon — the form most clients of the MCP server can set:
Authorization: Bearer qsc_a1b2c3d4e5f6g7h8i9j0k1l2:qss_…
The check and the refusals are the same as with Basic.
Any HTTP client can produce the Basic header. In Laravel:
use Illuminate\Support\Facades\Http;
$response = Http::baseUrl('https://quietsocial.dev/api/v1')
->withBasicAuth(config('services.quiet_social.client_id'), config('services.quiet_social.client_secret'))
->acceptJson()
->get('/me');
No API route is public. A request without valid credentials receives 401:
{
"error": {
"code": "unauthenticated",
"message": "Invalid credentials."
}
}
An unknown identifier, a wrong secret and a revoked client receive the same code, the same message and take the same time: the response does not let anyone guess which identifiers exist. When the header is missing, or is neither decodable Basic nor an identifier:secret bearer token, the message becomes « Send your client ID and secret with HTTP Basic authentication, or as a Bearer token "client_id:secret". »; the code stays unauthenticated.
GET /me
Tells you who the calling client is. It is the only route that requires no scope.
curl https://quietsocial.dev/api/v1/me \
-u "$QUIET_CLIENT_ID:$QUIET_CLIENT_SECRET"
{
"data": {
"client": {
"id": "qsc_a1b2c3d4e5f6g7h8i9j0k1l2",
"name": "Site vitrine",
"abilities": [
"destinations:read",
"publications:read",
"publications:create",
"media:create"
]
},
"workspace": {
"name": "Fabrique du Nord"
},
"brand": {
"id": "brd_01k4b8x2q9r7f3m5t6v8w0y2z4",
"name": "Fabrique du Nord",
"timezone": "Europe/Paris"
}
}
}
client.abilitieslists the granted scopes. Compare it with what your integration needs as soon as it starts.brandisnullwhen the client covers the whole workspace. This is the check to make to know whether your writes must carrybrand_id(see Scopes).- The workspace returns only its name: it has no public identifier, and nothing in the API is addressed by workspace.
Codes: 200, 401, 429.
What the API records
Each authenticated call updates the client's last-used date and IP address, and counts one request in the workspace's usage. These writes happen after the response: they do not delay it, and their failure does not make the call fail.