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”: “” }, “source”: { “href”: “” } }, “amount”: { “currency”: “USD”, “value”: “9.00” }, “metadata”: { “foo”: “bar”, “baz”: “boo” }}’ ‘

Which outputs:

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

I’ve tried appending “/v2” to the URL (, which gives me the same thing.

I then tried appending “/v2/” to the URL (, 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