API upload new document from Base64 return error 400 - I can´t figure this out
Making the below illustrated request to: https://api.box.com/ 2.0/files/content
I get this error: 400 - <html><title>Error 400 (Bad Request)!!1</title></html>
The following Header values have been tested:
Content-Type : application/json
multipart/form-data
Authorization: Bearer _MY-TOKEN_ (this works for other API calls)
as-user: Specific User ID (this works for other API calls)
Content-length: 237320 (this is correct and from other API response)
The following Query Parameters have been tested:
name: Name-string with and without “.pdf” (same as value in filename)
parent.id 253462775710
content_created_at: 2024-03-14T03:09:52-07:00
content_modified_at: 2024-03-14T03:09:52-07:00
filename: Name-string with and without “.pdf” (same as value in name)
file: PDF document as Base64 ENCODED byte-string (a long byte-string)
PDF document as Base64 DECODED byte-string (starts with: %PDF-1.5)
Can someone help me out and state the exact values that I need for both Headers and Query Parameters to upload a new document?
Please sign in to leave a comment.
Comments
0 comments