DHL Shipment label API Auth

1.7k Views Asked by At

Right now, i am trying to use the DHL Shipment Label API Shipment Label API Docs

But i cannot seem to find on the Auth request, what is the client_id and the client_secret The only thing i have from my registered app is the API_KEY and the API_SECRET and that gives me a 401 error code

Any help is amazing!

2

There are 2 best solutions below

0
Eric Windmeier On

i had also to fight with the documentation ;-)

That's how my CURL HEADER option looks like:

CURLOPT_HTTPHEADER => ["Accept: application/json",
            "Accept-Language: de-DE",
            "Authorization: Basic ".base64_encode($api_username.':'.$api_password),
            "content-type: application/json",
            "dhl-api-key: ".$api_key ]

I concatenate username and password with a colon and make a base64 encode. And I pass the api key through the parameter dhl-api.key

0
Eric Windmeier On

I find that the new DHL Group API Developer Portal is well organized and documented. Check it out at https://developer.dhl.com/ as the old developer documentation will be deprecated.