Switching to REST API
-
I cannot find any inof on how to exactly switch from SOAP to REST API. If I switch in the DHL plugin settings, there are no field to enter consumer key/secret, and in the DHL portal there are no settings either. So where do I need to enter them?
-
While I know you have the best of intentions, it's forum policy that you not ask users for admin or server access. Users on the forums aren't your customers, they're your open source collaborators, and requesting that kind of access can put you and them at high risk.
If they are paying customers (such as people who bought a premium service/product from you) then by all means, direct them to your official customer support system. But in all other cases, you need to help them here on the forums.
Thankfully are other ways to get information you need:
Ask the user to install the Health Check plugin and get the data that way.
Ask for a link to the http://pastebin.com/ or https://gist.github.com log of the user's web server error log.
Ask the user to create and post a link to theirphpinfo();output.
Walk the user through enabling WP_DEBUG and how to log that output to a file and how to share that file.
Walk the user through basic troubleshooting steps such and disabling all other plugins, clear their cache and cookies and try again (the Health Check plugin can do this without impacting any site vistors).
Ask the user for the step-by-step directions on how they can reproduce the problem.
You get the idea.
We know volunteer support is not easy, and this guideline can feel needlessly restrictive. It's actually there to protect you as much as end users. Should their site be hacked or have any issues after you accessed it, you could be held legally liable for damages. In addition, it's difficult for end users to know the difference between helpful developers and people with malicious intentions. Because of that, we rely on plugin developers and long-standing volunteers (like you) to help us and uphold this particular guideline.
When you help users here and in public, you also help the next person with the same problem. They'll be able to read the debugging and solution and educate themselves. That's how we get the next generation of developers.Hi @kkj
When you switch our plugin to REST, you do not need any “consumer key/secret”. Those are not used in this plugin. The token is handled internally.
How to switch to REST (exact steps)- Go to WooCommerce → Settings → Shipping → DHL Paket.
- Set Used API = REST.
- Fill in:
- Username = your Business Customer Portal username
- Password = your Business Customer Portal password
- Click Save.
- Click Get Account Settings (optional but recommended) to auto-fetch your EKP and validate access.
- Make sure your Participation numbers are set for the DHL products you use (the last two digits from your accounting number, e.g.
01).
That’s it. If you don’t see labels working after switching
- Re-check that you used the Portal username (not email) and the correct password.
- Try Get Account Settings again after saving.
- If login fails, see FAQ #05 in our docs (portal link + tips).
- Full docs: https://github.com/shadimanna/dhl-logistic-services-for-woocommerce/wiki/Documentation
@sal4sup thank you. I am confused tough – since I am switching from SOAP, my business portal username and pw are already there, and account settings were already received when the plugin was installed years ago. So do I need to re-enter and receive everything again?
Hello @kkj
If your Business Customer Portal username and password are already saved and working with SOAP, you don’t need to re-enter them. Just switch the API protocol to REST , then click Get Account Settings again after saving.
If it still fails, you might need to contact DHL support to make sure your account has access to the REST API.
Thank you
The topic ‘Switching to REST API’ is closed to new replies.