# Zoom Get API using PHP curl causing issues with hyphen in userid

**URL:** <https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280>\
**Category:** API and Webhooks\
**Created:** [August 5, 2020, 3:22am UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280 "2020-08-05T03:22:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshit\_Sharaff](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Harshit\_Sharaff](https://devforum.zoom.us/u/Harshit_Sharaff)\
**Post date:** [August 5, 2020, 3:22am UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/1 "2020-08-05T03:22:42Z")

</div>

**Description**  
User ID’s having hyhen(-) return empty array in response.

**Error**  
Empty array returned.

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

**Which Endpoint/s?**  
[https://api.zoom.us/v2/users/{$userId}/token](https://api.zoom.us/v2/users/%7B%24userId%7D/token)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Call [https://api.zoom.us/v2/users/{$userId}/token](https://api.zoom.us/v2/users/%7B%24userId%7D/token)
2. Empty array returned if **$userId** has a hyphen(-)

---

<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:** [August 5, 2020, 9:06pm UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/2 "2020-08-05T21:06:53Z")

</div>

Hey @Harshit_Sharaff,

I have replied to you here:

> [@Https://api.zoom.us/v2/users/{userid}/token not returning token](https://devforum.zoom.us/t/https-api-zoom-us-v2-users-userid-token-not-returning-token/19826/6):
>
> Hey @Harshit_Sharaff, Make sure the user has logged in with email to Zoom. If they have just used Google login for example, it will return an empty object. Thanks, Tommy

Let me know if that answered your question! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![Harshit\_Sharaff](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Harshit\_Sharaff](https://devforum.zoom.us/u/Harshit_Sharaff)\
**Post date:** [August 6, 2020, 1:53am UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/3 "2020-08-06T01:53:36Z")

</div>

Hey @tommy

It’s a normal email login. We have multiple users but only the ones having a hyphen(-) is returning an empty object. It seems to be some encoding issue during a curl PHP call to the Zoom API’s, something like a line break which happens after a hyphen(-). This is my guess.

---

<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:** [August 6, 2020, 8:45pm UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/4 "2020-08-06T20:45:35Z")

</div>

Hey @Harshit_Sharaff,

Can you share the userId with me so I can debug the issue?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![Harshit\_Sharaff](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Harshit\_Sharaff](https://devforum.zoom.us/u/Harshit_Sharaff)\
**Post date:** [August 7, 2020, 5:24am UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/5 "2020-08-07T05:24:42Z")

</div>

Hey @tommy,

I have shared the user id at [developersupport@zoom.us](mailto:developersupport@zoom.us). Please let me know if you need anything else apart from that from our side.

---

<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:** [August 7, 2020, 8:39pm UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/6 "2020-08-07T20:39:19Z")

</div>

Thanks @Harshit_Sharaff,

We will be with you as soon as possible.

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:** [August 17, 2020, 8:39pm UTC](https://devforum.zoom.us/t/zoom-get-api-using-php-curl-causing-issues-with-hyphen-in-userid/26280/7 "2020-08-17T20:39:25Z")

</div>

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