UploadDocument resta API
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 04:28 AM - edited 12-20-2024 03:09 AM
Hello when I upload a documenti with the uploadDocument rest API I get the error "bad request".
What is the correct payload for the call:
I am using python requests:
url = f"https://api.ebay.com/commerce/media/v1_beta/document/{document_id}/upload"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "multipart/form-data"
}
# Carica il file
with open(file_path, "rb") as file:
response = requests.post(url, headers=headers, data=file)
I tried with CURL and it works?
What is wrong?
Message 1 of 1
0 REPLIES 0
