Skip to content Kleinanzeigen Public API Gateway Documentation

The Kleinanzeigen Authentication API provides endpoints for authentication and token management. This API allows clients to obtain access tokens using the client credentials flow.

https://developer.kleinanzeigen.de/v2

POST /oidc/token

This endpoint is used to get an access token using the client credentials flow.

Content-Type: application/x-www-form-urlencoded

ParameterTypeDescription
grant_typestringMust be set to client_credentials
client_idstringYour client ID
client_secretstringYour client secret
audiencestringMust be set to consumer-goods-api
curl --location --request POST 'https://developer.kleinanzeigen.de/v2/oidc/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={your_client_id}' \
--data-urlencode 'client_secret={your_client_secret}' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'audience=consumer-goods-api'

Returns an access token response with the following properties:

{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 3600
}
PropertyTypeDescription
access_tokenstringThe JWT access token to be used for API requests
token_typestringThe type of token, always “bearer”
expires_inintegerThe number of seconds until the token expires
{
"error": "invalid_request",
"error_description": "Description of the error"
}
  • Keep your client_secret secure and never expose it in client-side code.
  • Access tokens have a limited lifetime as specified in the expires_in field.
  • When a token expires, request a new one using the same process.
ErrorDescription
invalid_requestThe request is missing a required parameter or is otherwise malformed.
invalid_clientClient authentication failed.
invalid_grantThe provided authorization grant is invalid.
unauthorized_clientThe client is not authorized to use this grant type.
unsupported_grant_typeThe authorization grant type is not supported.

For any questions or issues regarding this API, please contact the Kleinanzeigen API team.