Authentication

You'll need to authenticate your requests to access any of the endpoints in the Marktplaats API. Marktplaats API offers an OAuth flow to authenticate your API requests. In this guide, we'll look at how authentication works.

Authentication using OAuth

The way to authenticate with the Marktplaats API is by using OAuth. When establishing a connection using OAuth, you will need a ClientID / ClientSecret pair — you can manage them in your dashboard . When using an incorrect combination, a 401 Unauthorized status will return. Here are two ways how to get a new access token using cURL and the corresponding response:

Basic auth

POST
/api/auth/token
curl -G https://marktplaats{-staging}.studiewinkel.nl/api/auth/token \
  -H "Authorization: Basic Base64(clientId:clientSecret) \
  -d take=10

Response

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR....yibfCs-ck",
  "token_type": "Bearer",
  "expires_in": 3600
}

You can now use the accessToken to authorize api calls

Example request to resource api

GET
/api/v1/offers?eans=9781684988983,9781733572941,9781684989294
curl -G https://marktplaats{-staging}.studiewinkel.nl/api/v1/offers?eans=9781684988983,9781733572941,9781684989294 \
  -H "Authorization: Bearar {access_token} \

When your access_token is expired (default after 1 hour), the corresponding API call will result a 403 Forbidden status and you have to get a new one.

Was this page helpful?