# Bug when trying to delete a valid username

**URL:** <https://community.sendbird.com/t/bug-when-trying-to-delete-a-valid-username/1924>\
**Category:** JavaScript\
**Created:** [March 21, 2021, 4:42pm UTC](https://community.sendbird.com/t/bug-when-trying-to-delete-a-valid-username/1924 "2021-03-21T16:42:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonb](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@simonb](https://community.sendbird.com/u/simonb)\
**Post date:** [March 21, 2021, 4:42pm UTC](https://community.sendbird.com/t/bug-when-trying-to-delete-a-valid-username/1924/1 "2021-03-21T16:42:57Z")

</div>

Hi,

We have initially created users with the structure of emails. eg.  
+1@ourdomain.com  
You can create the user and login, but where the userid is passed as a URL parameter you get a user not found error.

Please look into this.  
/Simon

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [March 21, 2021, 11:51pm UTC](https://community.sendbird.com/t/bug-when-trying-to-delete-a-valid-username/1924/2 "2021-03-21T23:51:27Z")

</div>

@simonb,

Hey there! Have you tried URL Encoding the email when passing it as a URL parameter? Additionally, could you give me a specific endpoint you’re experiencing this on?

-Tyler

---

<div class="post-metadata">

**Author:** ![simonb](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@simonb](https://community.sendbird.com/u/simonb)\
**Post date:** [March 22, 2021, 7:59am UTC](https://community.sendbird.com/t/bug-when-trying-to-delete-a-valid-username/1924/3 "2021-03-22T07:59:07Z")

</div>

@Tyler

Hi,

That did the trick. It worked when I changed to URL encode the email from the encodeURI to the encodeURIComponent.

For anyone coming across this, the js impl was:

```auto
path: `/v3/users/${encodeURIComponent(sendbirduserid)}`

```

Thanks,  
/Simon
