Sample "raw" request not working


(Hasan Diwan) #1

I’m testing out the sample code to send a raw request using curl:

curl -X POST -H “Authorization: Bearer elq7kponDPk4iT5DUllTIHL5H5vhZCORKLQ6aB3jfkfSnqSNw6” \ -H “Content-Type: application/vnd.dwolla.v2.hal+json” \ -H “Accept: application/vnd.dwolla.v1.hal+json” \ -d ‘{ “_links”: { “destination”: { “href”: “https://api-uat.dwolla.com/funding-sources/929e1066-3ad0-4799-9f0d-30121f71375d” }, “source”: { “href”: “https://api-uat.dwolla.com/funding-sources/617c9d7f-84a8-4e1b-8bb5-831db7fde136” } }, “amount”: { “currency”: “USD”, “value”: “9.00” }, “metadata”: { “foo”: “bar”, “baz”: “boo” }}’ ‘https://api-uat.dwolla.com/transfers

Which outputs:

< {“code”:“InvalidVersion”,“message”:“Missing or invalid API version.”}

I’ve tried appending “/v2” to the URL (https://api-uat.dwolla.com/transfers/v2), which gives me the same thing.

I then tried appending “/v2/” to the URL (https://api-uat.dwolla.com/transfers/v2), to no avail.

So, my question is, how do I specify the API version? Many thanks!


(Spencer Hunter) #2

Hey @hd1, Everything looks good with the exception of the Content-Type header you are passing in. You’ll need to change application/vnd.dwolla.v2.hal+json to application/vnd.dwolla.v1.hal+json


(Cory Anderson) #3

(Cory Anderson) #4

(Cory Anderson) #5