You need an active customer account at tme.eu and access to your e-mail. Open two browser tabs, developers.tme.eu and tme.eu, because you'll switch between them. The map shows where each step happens.
Go to developers.tme.eu and click Sign Up in the top-right corner. Fill in the form, accept the Terms and Conditions of the service and TME API, and click Register.
In Customer type, choose Company, Consumer – private customer or Sole Trader. For Company and Sole Trader, also enter your company name.
Password: 8–30 characters, at least one uppercase and one lowercase letter, at least one digit and at least one of these symbols: ( ) ! @ $ % ^ & * + #
Open the e-mail Activation link from [email protected] and click Activate account. You'll land on the login page, where you log in with your e-mail and password.
Can't find the e-mail? Check your spam folder.
A private key is always generated for an application. In the API Token keys tab, enter an application name and click Create application.
Keep this tab open, you'll need it in step 6.
In a second tab, log in to tme.eu, open the User panel and choose Applications.
Click Register a new application and copy the temporary token with the copy icon next to it. It links your tme.eu account to your developer application.
Back in the developers.tme.eu tab, paste the temporary token into the Temporary token field of your application, choose Key purpose and click Generate new private key. A green confirmation message appears.
Click Show private keys. Your key is in the Token column. To see the application secret, click the eye icon next to Application secret.
The token (50 characters) is your Basic Auth username, the application secret (20 characters) is the password.
The values shown are examples.
The API uses OAuth 2.0. Exchange your token and secret for an access token:
curl --location 'https://api.tme.eu/auth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <base64(token:secret)>' \
--data-urlencode 'grant_type=client_credentials'The response contains an access_token valid for 300 seconds and a refresh_token. Send the access token in every request as Authorization: Bearer <access_token>:
curl --location --globoff 'https://api.tme.eu/products?symbols[]=1N4007-DIO' \
--header 'Authorization: Bearer ACCESS_TOKEN'Your key is linked to your tme.eu account, so the API returns data as you'd see it when logged in, including your individual prices. For the prices a visitor who isn't logged in sees, add this header:
request-context: anonymous