API for the German postal service.
View the Project on GitHub ApplicationProgrammingInterface/DeutschePost
OAuth 2.0 Tokens can be requested with different permissions ( scopes ).
To request a Token you have to encode your Credentials.
Authentication-Code
= Base64( 'Client-Id' + ':' + 'Client-Secret' )
| Id | 1932b677-269a-456c-825d-52b11e395419 |
|---|---|
| Secret | 71ebf780-f541-4d8b-a28e-f4663d90b006 |
| Authentication Code |
MTkzMmI2NzctMjY5YS00NTZjLTgyNWQtNTJiMTFlMzk1NDE5OjcxZWJmNzgwLWY1NDEtNGQ4Yi1hMjhlLWY0NjYzZDkwYjAwNg==
|
Now simply send a GET request to the
Endpoint with the following properties:
| Content-Type | application/json |
|---|---|
| Accept | |
| Authorization Code |
[ Authentication Code ] |
A successful response will be in the format of:
{
"access_token" : "hk7jh654g46hg4546..." ,
"token_type" : "Bearer" ,
"expires_in" : 18000 ,
"scope" : "dpilabel dpitracking"
}
token_type:
Type of the OAuth 2.0 Token,
not relevant, can be ignored.
expires_in:
Time in seconds,
default: 18000 ➔ 5 hours.
scope:
What API access this token grants.