api
api copied to clipboard
Try a upload, cant get it work.
Hi there, i'm trying to use the upload api but couldnt get it worked.
Can someone help me. My code looks now like this:
Set FILE=C:\Users\..\Documents\..\tmp\tmp.jpg Set CLIENT-ID=.. Set OAUTH-TOKEN=.. call :setsize %FILE% curl -h "X-Access-Token: %OAUTH-TOKEN%" -H "X-Client-ID: %CLIENT-ID%" -H "file_name: tmp.jpg" -h "file_size: %SIZE%" -d "@%FILE%" -H "Content-Type: application/json" -H "content_type: image/jpg" -X POST https://a.wunderlist.com/api/v1/uploads
Tried everything I know, but nothing worked, always a 400 :(. Using curl on a windows desktop.
- 1 , we need better documentation stating how to achieve this whole complex flow.
curl -d '{"file_name":"image_lv.png", "file_size":32000, "content_type":"image/png"}' -H "Content-Type: application/json" -H "X-Access-Token: [YOUR_ACCESS_TOKEN]" -H "X-Client-ID: [YOUR_CLIENT_ID]" -X POST https://a.wunderlist.com/api/v1/uploads
Response
{
"id":194995777,
"user_id":83893571,
"state":"new",
"type":"upload",
"expires_at":"2018-05-18T10:15:23.609Z",
"part":{
"url":"https://upload.wunderlist.io/9a28bb30-3cb1-0136-bc97-22000a5bc116-1526638223-561467?partNumber=1&uploadId=_FK8Y3M0ljnCJfng4GfieQD6ihmj5DivjhZ8XJdjCe9TxLKMBxyP7.UGHYfbqG4CzJ_b1wmE99ydqwtJVKyTLhoHbx2.jo.Y5zI2USrgPldmstGsqff_2GcbLs4Xkume",
"date":"Fri, 18 May 2018 10:15:23 UTC +00:00",
"authorization": "AWS SOME-KEY-HERE:SOME-SIGNATURE-HERE"
}
}