I'm trying to run a simple POST Request on one of the API's I'm trying to execute. I can successfully run this as a windows 'curl' command but it doesn't give me the same result with POST Request Node.
This is the curl command I'm running:
curl -d "grant_type=client_credentials" -H "Authorization: Basic bklvejh2MEs3RUp6azZadXpmalJHZ3VWdFJCN0lySDY6RVFGOU1oczVrRlZQNkc2Tw==" -X POST https://api.pitneybowes.com/oauth/token
I there something very basic I'm missing?
Thanks !
Mohammed Ayub
Hi Mohammed,
I just had a quick look at the pitney bowes API documentation. It seems like the Content-Type has to be application/x-www-form-urlencoded, whereas the POST Request node in KNIME uses JSON. Please have a look at this workflow to see how you can get this to work: https://www.knime.com/nodeguide/data-access/rest-web-services/sugarcrm-meets-salesforce
The Salesforce API also requires application/x-www-form-urlencoded, so you should be able to adapt that part of the workflow to your use case.
Cheers,
Roland
Awesome, that actually worked like a charm. Thanks !
Mohammed Ayub