CPL API
Useful links
  • Developer
  • Sandbox
Useful links
  • Developer
  • Sandbox
Přepni do češtiny
  1. Authentication
  • Introduction
  • General
  • Creation of orders and shipments
  • Changelog
  • Authentication
    • Getting Bearer token
      POST
  • API Methods
  • Examples
    • Response - pick up labels (PDF A4)
    • Response - pickup label (ZPL)
    • Response - pick up label (JPG)
    • Shipment - shipment set items
    • International Shipment with or without COD – Parcels in a Set
    • Multiple shipments in one request
    • Shipment connect
  • FAQ
  • Postman Collection
  • Postman Flows
  1. Authentication

Getting Bearer token

Developing
POST
https://api-dev.dhl.com/ecs/ppl/myapi2/login/getAccessToken
Maintainer:Not configured

Request

Header Params

Body Params application/x-www-form-urlencoded

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-dev.dhl.com/ecs/ppl/myapi2/login/getAccessToken' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=clientID' \
--data-urlencode 'client_secret=clientSecret' \
--data-urlencode 'scope=myapi2'

Responses

🟢200Success
application/json
Body

Example
{}
Modified at 2025-09-09 10:05:01
Previous
Authentication
Next
API Methods