make a POST request to NVP/SOAP

ssc-developer
New Community Member

curl POST -d USER=[username] -d PWD=[password] -d SIGNATURE=[signature] -d METHOD=TransactionSearch -d TRANSACTIONCLASS=RECEIVED -d STARTDATE=2019-05-21T05:38:48Z -d ENDDATE=2019-05-22T05:38:48Z -d VERSION=94 https://api-3t.paypal.com/nvp

 

'''''

Response

'''''

 

curl: (6) Could not resolve host: POST

 

TIMESTAMP=2019%2d06%2d19T15%3a00%3a11Z&CORRELATIONID=8439e637f94&ACK=Failure&VERSION=94&BUILD=52546130&L_ERRORCODE0=10002&L_SHORTMESSAGE0=Security%20error&L_LONGMESSAGE0=Security%20header%20is%20not%20valid&L_SEVERITYCODE0=Error%

 

Hi all,

 

I've run into some problems, well actually a lot of problems with the api lately. I'm currently trying to request information from the nvp api so I can get a ordered list of transactions within a given timeframe for my company. I've included one of the many ways I've tried to make this request above and below that I've included the response.

This seemed the easiest way for me to get the data I need with minimal calls to the api. I've also had trouble with REST api calls, but maybe I'll save that for another post.

Login to Me Too
1 REPLY 1

shawnz
Contributor
Contributor

The syntax to do a POST request with cURL is "curl -X POST", not "curl POST". In your example it is interpreting "POST" as the URL which is why it is giving the error message "Could not resolve host: POST".

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.