I am using Laravel to query the Box Api endpoints. I am specifically getting an error on the Box File upload api.
Here is the piece of code that I am using:
Http::asForm()
->withToken($this->accessToken)
->post($this->uploadUrl, $attributes);
Here is curl equivalent of the same:
curl -H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer {Token}' -d 'attributes%5Bname%5D=test.pdf&attributes%5Bparent%5D%5Bid%5D=12345&file=test.pdf' -X 'POST' 'https://upload.box.com/api/2.0/files/content'
Please help.