# Test Request Uploading virtual background not working

**URL:** <https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829>\
**Category:** API and Webhooks\
**Created:** [March 29, 2021, 10:55am UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829 "2021-03-29T10:55:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ido1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ido1/32/25216_2.png) [@ido1](https://devforum.zoom.us/u/ido1)\
**Post date:** [March 29, 2021, 10:55am UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/1 "2021-03-29T10:55:20Z")

</div>

**Description**  
Attempting to upload a virtual background in the test request section of [https://marketplace.zoom.us/docs/api-reference/zoom-api/users/uploadvbuser](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/uploadvbuser)  
I have tried a similar request with upload profile picture POST request and get a similar error  
I have tried with multiple different images in different formats and nothing seems to work

**Error**  
{  
“code”: -1,  
“message”: “Required request part ‘file’ is not present”  
}

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
POST [https://api.zoom.us/v2/users/me/settings/virtual\_backgrounds](https://api.zoom.us/v2/users/me/settings/virtual_backgrounds)

Headers:  
Authorization: Bearer   
Content-Type: multipart/form-data

Body:  
{  
“file”: “”  
}

Anyone have any idea what’s wrong?

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 29, 2021, 8:30pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/2 "2021-03-29T20:30:10Z")

</div>

Hey @ido1,

Thanks for reaching out about this.

As a first step, can you make sure you’re passing the file as multipart/form-data? If you attempt to pass the file path as a string in your request body JSON, I don’t believe this will work.

Let me know if making this change gives you better luck!

Best,  
Will

---

<div class="post-metadata">

**Author:** ![ido1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ido1/32/25216_2.png) [@ido1](https://devforum.zoom.us/u/ido1)\
**Post date:** [March 30, 2021, 6:16pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/3 "2021-03-30T18:16:57Z")

</div>

![file_not_present](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/2/829eb6ab6f303eb41080787f3e8b71b45a039af7.jpeg)  
Is there something wrong here that I’m not seeing? The file is a public image on s3, but I’ve tried other public image urls and always the same error

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 30, 2021, 9:57pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/4 "2021-03-30T21:57:29Z")

</div>

Hey @ido1,

Can you check that you’re passing the following header as well?  
Content-Type: multipart/form-data

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![ido1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ido1/32/25216_2.png) [@ido1](https://devforum.zoom.us/u/ido1)\
**Post date:** [March 31, 2021, 5:09pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/5 "2021-03-31T17:09:46Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/e/0ec798efdd505466b9c7818e5b854f63e92daf3f.png)  
Yeah, it’s there by default it seems

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [March 31, 2021, 5:43pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/6 "2021-03-31T17:43:05Z")

</div>

Thanks for confirming @ido1. Do you run into this same error when you download the file locally and pass the relative path as the value for `file`?

---

<div class="post-metadata">

**Author:** ![ido1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ido1/32/25216_2.png) [@ido1](https://devforum.zoom.us/u/ido1)\
**Post date:** [March 31, 2021, 6:40pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/7 "2021-03-31T18:40:07Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/f/2f914b5dcb0de133fe65dd649a3b219906e16636.png)  
Also tried this, but maybe I’m messing up the format?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 5, 2021, 7:59pm UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/8 "2021-04-05T19:59:32Z")

</div>

Hey @ido1 ,

Checkout this thread for uploading a photo via the Zoom API:

> [@Helpful Tip: Uploading user pictures requires multipart request](https://devforum.zoom.us/t/helpful-tip-uploading-user-pictures-requires-multipart-request/2527):
>
> [POST /users/{userId}/picture](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/userpicture) is documented as taking one piece of request data “pic\_file” which is of type “file” and “must be a jpg/jpeg” but provides no other documentation. The test request shows an example with the Content-Type application/json, but attempting to use this will return a 400 Bad Request error with the message “Current request is not a multipart request”. Instead, I found success piecing together random comments on the internet and using “Content-Type: multipart/form-data; bou…

Let me know if that helps! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 6, 2021, 5:59am UTC](https://devforum.zoom.us/t/test-request-uploading-virtual-background-not-working/46829/9 "2021-05-06T05:59:34Z")

</div>

Closed on May 6, 2021, 5:59am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
