DHL

DHL Authentication API

Authentication related calls

GitHub OpenAPI

Operations 8

GET /dpi/v1/auth/accesstoken Get Access New Token #
GET /dpi/v1/auth/accesstoken/info Get Access Token Info #
GET /dpi/v1/auth/accesstoken/revoke Revoke Access Token #
POST /token Obtains an access token based on the credentials submitted or based on the… #
POST /user/v1/authentication/postshoplogin Retrieve a dm access token for a registered user from the Post Shop #
POST /user/v1/authentication/gkplogin Retrieve a dm access token for a registered user from a GKP token #
POST /user/v1/authentication/businesslogin Retrieve a jwt for a business login #
GET /user/v1/authentication/reauth Creates a new jwt with the maximum period of validity for the currently logged… #

Documentation

📖
Documentation
https://developer.dhl.com/tracking
📖
Documentation
https://developer.dhl.com/api-reference/shipment-tracking-unified-push
📖
Documentation
https://developer.dhl.com/api-reference/additional-services-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/authentication-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/authentication-api-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/authentication-api-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/datafactory-autocomplete-20-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-hybrid-mail-shipments-e-post-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-international-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-internetmarke-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-print-mailing-dispatch-preparation-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-print-mailing-targeting-post-parcel-germany
📖
Documentation
https://developer.dhl.com/parcel-connect
📖
Documentation
https://developer.dhl.com/api-reference/econnect-beta-dhl-ecommerce-europe
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-pickup-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-postnumber-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-private-shipping-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/parcel-de-shipping-post-parcel-germany-v2
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-shipment-tracking-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dgf-document
📖
Documentation
https://developer.dhl.com/api-reference/duty-tax-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/ecommerce-uk
📖
Documentation
https://developer.dhl.com/api-reference/parcel-eu
📖
Documentation
https://developer.dhl.com/api-reference/pickup-cancellation-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/price-quote-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/print-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/product-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/product-and-sub-product-pickup-detail-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/product-finder-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/products-api-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dgf-push-api
📖
Documentation
https://developer.dhl.com/api-reference/registration-pickup-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/return-label-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/shipment-booking-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/dgf-shipment-booking
📖
Documentation
https://developer.dhl.com/api-reference/shipment-label-dhl-global-forwarding
📖
Documentation
https://developer.dhl.com/api-reference/dgf-shipment-status
📖
Documentation
https://developer.dhl.com/api-reference/shipment-tracking-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/shipment-tracking-v2-dhl-global-forwarding
📖
Documentation
https://developer.dhl.com/api-reference/time-table-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/tracking-dhl-ecommerce-americas

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dhl:dhl-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dhl-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 5.7.10
  title: Deutsche Post International Shipping Authentication API
  description: 'Welcome to the Deutsche Post International API!


    This API provides an interface for our shipping and tracking services. It enables open integration channels for our customers and partners.'
servers:
- url: https://api-sandbox.dhl.com/
tags:
- name: Authentication
  description: Authentication related calls
paths:
  /dpi/v1/auth/accesstoken:
    get:
      operationId: getAccessToken
      summary: Get Access New Token
      description: 'The Get access_token API call provides OAuth 2.0 Bearer token, assigned to your Consumer_key and Consumer_secret, which will grants you an access to the Deutsche Post International Shipping APIs.


        If you already received credentials for the old gateway these remain valid until further notice.


        The API operation is secured by HTTP Basic authentication, therefore you have to provide `Consumer_key` and `Consumer_secret` as an username and password, when calling the API..


        **Example:**

        1. You will receive `Consumer_key` and `Consumer_secret` from Deutsche Post International representative in following format.


        Credentials below are exemplary and can _NOT_ be used in this Sandbox environment to get the access_token.


        ````

        Consumer_key: 5qsFCFLzeoz4C6PKJ7yH3NDQHgBEJLt7

        Consumer_secret: P6mEGGaAZ2TdkLpD

        ````


        2. When passing the `Consumer_key` and `Consumer_secret` via HTTPS request, using HTTP Basic authentication, you have to

        populate HTTP Header Authorization in following format.

        > **Note:** *`Consumer_key` and `Consumer_secret` has to be encoded in base64-encoding. There is a `space` characeter between Basic and the base64-encoded string. There is a `:` character between the Consumer_key and Consumer_secret, when encoded in base64-encoding.*


        ````

        Authorization: Basic base64-encoded(Consumer_key:Consumer_secret)

        Authorization: Basic NXFzRkNGTHplb3o0QzZQS0o3eUgzTkRRSGdCRUpMdDc6UDZtRUdHYUFaMlRka0xwRA==

        ````


        > **Note:** *You can test the Get access_token API directly from the documentation page. The Authorization HTTP Header was populated for you in the Console View on the right side of the screen.*


        3. You will receive following response in the JSON format.


        ````

        {

        "access_token": "8CyAkmSppbfG5KAQ4AinTZ8RVJnD",

        "token_type": "Bearer",

        "expires_in": 17999

        }

        ````


        Understanding of the response fields:

        `access_token:` Contains access_token string for the Shipping / Tracking API authentication and authorization.


        `token_type:` Type of the OAuth 2.0 access_token. Default value is "Bearer".


        `expires_in:` Time to live of the access_token. Default value is 18000 seconds / 5 hours. After this time the token expires.'
      tags:
      - Authentication
      parameters:
      - in: header
        name: Authorization
        description: HTTP Basic Authorization string (base 64 encoded)
        required: true
        x-example: Basic NXFzRkNGTHplb3o0QzZQS0o3eUgzTkRRSGdCRUpMdDc6UDZtRUdHYUFaMlRka0xwRA==
        schema:
          type: string
      - name: Accept
        in: header
        required: true
        description: ''
        x-example: '*/*'
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccessTokenResponse'
              example:
                access_token: 8CyAkmSppbfG5KAQ4AinTZ8RVJnD
                token_type: Bearer
                expires_in: 17999
    servers:
    - url: https://api-sandbox.dhl.com/
  /dpi/v1/auth/accesstoken/info:
    get:
      operationId: getAccessTokenInfo
      summary: Get Access Token Info
      description: The Get access_token Info API call provides an information about the issued token.
      tags:
      - Authentication
      parameters:
      - name: token
        in: query
        required: false
        description: access_token string
        schema:
          type: string
      responses:
        '200':
          description: Successful response code in case you provided valid access_token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccessTokenInfoResponse'
              example:
                expires_in: '643'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccessTokenInfo401Response'
              example:
                status: 401
                title: Unauthorized
                detail: Token has expired.
    servers:
    - url: https://api-sandbox.dhl.com/
  /dpi/v1/auth/accesstoken/revoke:
    get:
      operationId: revokeAccessToken
      summary: Revoke Access Token
      description: The Revoke access_token API call provides you an option to revoke your access_token, which not yet expired.
      tags:
      - Authentication
      parameters:
      - name: token
        in: query
        required: false
        description: access_token string
        schema:
          type: string
      responses:
        '200':
          description: Success response code can be seen.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevokeAccessTokenResponse'
              example:
                status: Access token revocation processed
    servers:
    - url: https://api-sandbox.dhl.com/
  /token:
    post:
      operationId: DispenseToken
      summary: Obtains an access token based on the credentials submitted or based on the…
      description: 'The client makes a request to the token endpoint by adding the following parameters

        using the application/x-www-form-urlencoded format with a character

        encoding of UTF-8 in the HTTP request entity-body:


        * grant_type __REQUIRED__. Must be set to "password".


        * client_id __REQUIRED__ (aka client_id (api key))


        * client_secret __REQUIRED__ (aka client_secret)


        * username __REQUIRED__. The resource owner username. Aka username for business customer portal


        * password __REQUIRED__. The resource owner password. Aka password for business customer portal


        __Notes__


        * Returns an opaque access token. Use this as BearerToken where required.

        * Example values can be used as-is to try out with the sandbox.


        __Note__: this resource only supports POST. Any other HTTP method results in a 405 (Method Not Allowed).'
      tags:
      - Authentication
      requestBody:
        description: requestBody payload
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                  - password
                  example: password
                username:
                  type: string
                  example: user-valid
                  description: GKP user name. Required for grant_type=password.
                password:
                  type: string
                  example: SandboxPasswort2023!
                  description: GKP password. Required for grant_type=password.
                client_id:
                  type: string
                  example: KH2iQ8YwGYtGs4XUBKaGaiyWBPEZnsRm
                client_secret:
                  type: string
                  example: V8yPDt8GlGlNMRCh
              required:
              - grant_type
              - client_id
              - client_secret
              - username
              - password
            example:
              grant_type: password
              username: user-valid
              password: SandboxPasswort2023!
              client_id: KH2iQ8YwGYtGs4XUBKaGaiyWBPEZnsRm
              client_secret: V8yPDt8GlGlNMRCh
      responses:
        '200':
          description: Contains the bearer token to be used.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
              example:
                access_token: UtN71yyK8y8tuargZzmttyx8Y7Lp
                token_type: Bearer
                expires_in: 1799
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
    servers:
    - description: Sandbox Environment (Testing and Onboarding)
      url: https://api-sandbox.dhl.com/parcel/de/account/auth/ropc/v1
    - description: Production Environment
      url: https://api-eu.dhl.com/parcel/de/account/auth/ropc/v1
  /user/v1/authentication/postshoplogin:
    post:
      tags:
      - Authentication
      summary: Retrieve a dm access token for a registered user from the Post Shop
      operationId: loginPostShopUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostShopLoginRep'
        required: true
      responses:
        '200':
          description: Successfully generated a new access token. Find it in the response 'jwtToken'.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRep'
        '403':
          description: If a private user tries to login (DM_CUS_0001), or customerEkp is different from the one already saved in customer data (DM_CUS_0003) or the user is not allowed to login via postshop and has to use GKP (DM_CUS_0027).
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /user/v1/authentication/gkplogin:
    post:
      tags:
      - Authentication
      summary: Retrieve a dm access token for a registered user from a GKP token
      operationId: loginGkpUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGkpLoginRep'
        required: true
      responses:
        '200':
          description: Successfully generated a new access token. Find it in the response 'jwtToken'.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRep'
        '422':
          description: Unprocessable entity if the GKP token is invalid.
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /user/v1/authentication/businesslogin:
    post:
      tags:
      - Authentication
      summary: Retrieve a jwt for a business login
      operationId: loginBusinessUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBusinessLoginRep'
        required: true
      responses:
        '200':
          description: Successfully generated a new jwt. Find it in the response 'jwtToken'.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRep'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /user/v1/authentication/reauth:
    get:
      tags:
      - Authentication
      summary: Creates a new jwt with the maximum period of validity for the currently logged…
      operationId: reauth
      responses:
        '200':
          description: Successfully generated a new jwt. Find it in the response 'jwtToken'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenRep'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
components:
  schemas:
    GetAccessTokenInfoResponse:
      title: Get access_token Info response
      example:
        audience: b0601394-d106-4bca-a825-af40b7422640
        user_id: b0601394-d106-4bca-a825-af40b7422640
        expires_in: 15951
      type: object
      properties:
        audience:
          description: ''
          example: b0601394-d106-4bca-a825-af40b7422640
          type: string
        user_id:
          description: ''
          example: b0601394-d106-4bca-a825-af40b7422640
          type: string
        expires_in:
          description: ''
          example: 15951
          type: integer
          format: int32
      required:
      - audience
      - user_id
      - expires_in
    RevokeAccessTokenResponse:
      title: Revoke access_token response
      example:
        message: access_token revocation processed.
      type: object
      properties:
        message:
          description: ''
          example: access_token revocation processed.
          type: string
      required:
      - message
    GetAccessTokenInfo401Response:
      title: Get access_token Info 401 response
      example:
        error: invalid_token
        error_description: The presented token is invalid or expired.
      type: object
      properties:
        error:
          description: ''
          example: invalid_token
          type: string
        error_description:
          description: ''
          example: The presented token is invalid or expired.
          type: string
      required:
      - error
      - error_description
    GetAccessTokenResponse:
      title: Get access_token response
      example:
        access_token: vzoJsASlFm0rfz3HsZEWC69lgQcytQQqWJvk9eBL3cMF8j7W4ny4Dh
        token_type: Bearer
        expires_in: 18000
      type: object
      properties:
        access_token:
          description: ''
          example: vzoJsASlFm0rfz3HsZEWC69lgQcytQQqWJvk9eBL3cMF8j7W4ny4Dh
          type: string
        token_type:
          description: ''
          example: Bearer
          type: string
        expires_in:
          description: ''
          example: 18000
          type: integer
          format: int32
      required:
      - access_token
      - token_type
      - expires_in
    TokenResponse:
      description: tokenresponse
      type: object
      properties:
        access_token:
          type: string
          description: Opaque access token to be used for Bearer authentication
          maxLength: 50
          example: UtN71yyK8y8tuargZzmttyx8Y7Lp
        token_type:
          type: string
          description: Will be set to 'Bearer'
          maxLength: 20
          example: Bearer
        expires_in:
          type: integer
          description: Seconds
          example: 1799
      example:
        access_token: UtN71yyK8y8tuargZzmttyx8Y7Lp
        token_type: Bearer
        expires_in: 1799
    TokenRep:
      type: object
      properties:
        jwtToken:
          type: string
          description: The DM-Suite token.
    CreateBusinessLoginRep:
      required:
      - locale
      - password
      - username
      type: object
      properties:
        username:
          minLength: 1
          type: string
          description: The username of the user to login.
        password:
          minLength: 1
          type: string
          description: The password of the user to login.
        locale:
          minLength: 1
          type: string
          description: The locale used for subsequent requests (e.g. 'de' or 'en').
      description: The business login data.
    CreatePostShopLoginRep:
      required:
      - jwtToken
      type: object
      properties:
        jwtToken:
          minLength: 1
          type: string
          description: The json web token generated by the post shop as plain text.
      description: The postshop login data.
    CreateGkpLoginRep:
      required:
      - gkpToken
      type: object
      properties:
        gkpToken:
          minLength: 1
          type: string
          description: The json web token generated by gkp as plain text.
      description: The token from GKP as JWT.
  responses:
    '400':
      description: 'Bad Request - The request could not be understood by the server due to malformed syntax.

        '
    '403':
      description: 'Forbidden - The client has successfully been authenticated but could not be authorized for the particular request.

        '
    '401':
      description: 'Unauthorized - The client could not be authenticated. There are multiple possible reasons for this. This includes bad or missing credentials. The error message should provide additional information.

        '
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Opaque access token obtained via earlier OAuth2 Password grant flow.
      bearerFormat: Apigee