# When create a user via API, does not get a PMI value

**URL:** <https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609>\
**Category:** API and Webhooks\
**Created:** [November 10, 2020, 4:55pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609 "2020-11-10T16:55:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliancp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juliancp/32/7191_2.png) [@juliancp](https://devforum.zoom.us/u/juliancp)\
**Post date:** [November 10, 2020, 4:55pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/1 "2020-11-10T16:55:26Z")

</div>

When i create a user via API, the PMI value get a “0” value and i can’t shedule a meeting via API:

{  
“account\_id”: “mone2xwdQ9G4xl3Ziayrrw”,  
“cms\_user\_id”: “”,  
“company”: “Cloud”,  
“created\_at”: “2020-11-10T14:51:59Z”,  
“dept”: “engineering”,  
“email”: “[127913@urosario.edu.co](mailto:127913@urosario.edu.co)”,  
“first\_name”: “2020-2E\_75410016\_Grp 3\_GESTION INTEGRAL DE HSEQ Y SOSTENIBILIDAD”,  
“group\_ids”: [  
“WdHJZ6dKS-6c\_W5vaENvFQ”  
],  
“host\_key”: “930967”,  
“id”: “oevBKJf1Rxapvh6A68mS2g”,  
“im\_group\_ids”: ,  
“jid”: “[oevbkjf1rxapvh6a68ms2g@xmpp.zoom.us](mailto:oevbkjf1rxapvh6a68ms2g@xmpp.zoom.us)”,  
“job\_title”: “”,  
“language”: “”,  
“last\_name”: “\_GESTION INTEGRAL DE HSEQ Y SOSTENIBILIDA. GPCI-4-PEI-710D”,  
“location”: “”,  
“personal\_meeting\_url”: “”,  
“phone\_country”: “”,  
“phone\_number”: “”,  
“pmi”: 0,  
“role\_name”: “Member”,  
“status”: “active”,  
“timezone”: “”,  
“type”: 1,  
“use\_pmi”: true,  
“verified”: 1  
}

---

<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:** [November 11, 2020, 6:37pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/2 "2020-11-11T18:37:22Z")

</div>

Hey @juliancp,

Can you share the full request you’re using to create the user via API, for which you’re getting this response?

Thanks!  
Will

---

<div class="post-metadata">

**Author:** ![juliancp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juliancp/32/7191_2.png) [@juliancp](https://devforum.zoom.us/u/juliancp)\
**Post date:** [November 11, 2020, 7:32pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/3 "2020-11-11T19:32:08Z")

</div>

Hi Will. i use the “create user code” generated in the API web page:

```auto
import http.client

conn = http.client.HTTPSConnection("[api.zoom.us](http://api.zoom.us)")

payload = "{\"action\":\"create\",\"user_info\":{\"email\":\"[dhjdfkghdskjf@fgkjfdlgjfkd.gh](mailto:dhjdfkghdskjf@fgkjfdlgjfkd.gh)\",\"type\":1,\"first_name\":\"Terry\",\"last_name\":\"Jones\"}}"

headers = {
    'content-type': "application/json",
    'authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOm51bGwsImlzcyI6Ijd2UmxEWWVVUmRlSlV3alh1S05jLWciLCJleHAiOjE2MjcwMDA4NjAsImlhdCI6MTU5NTQ1OTUxN30.jyTDY9kIdr5ZuLwzxBKbV0s0iPlDNtU1VGVJa6ATqxo"
    }

conn.request("POST", "/v2/users", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

```

---

<div class="post-metadata">

**Author:** ![juliancp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juliancp/32/7191_2.png) [@juliancp](https://devforum.zoom.us/u/juliancp)\
**Post date:** [November 11, 2020, 7:35pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/4 "2020-11-11T19:35:08Z")

</div>

One thing, only after i have created the user, and enter to that user via web page, it seems automatically assign a PMI value, before that, i am able to create the user, but the PMI value is always “0”.

---

<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:** [November 12, 2020, 7:58pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/5 "2020-11-12T19:58:36Z")

</div>

Hey @juliancp,

If you do a GET User request for the same user after creating them, are you still seeing the ‘0’ value for PMI? Also, the example request you shared seems to be different—do you have the payload that matches up with your first request?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![juliancp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juliancp/32/7191_2.png) [@juliancp](https://devforum.zoom.us/u/juliancp)\
**Post date:** [November 17, 2020, 1:39pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/6 "2020-11-17T13:39:41Z")

</div>

![IMG_2124](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/c/bc4dccc99a18329ccfac0531acd65d0f9f6b3b19.jpeg) ![IMG_2126](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/0/b04027927b916821506f6f9eeb6e29904ff7d79d.jpeg) ![IMG_2125](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/4/840a91c4e8d72206eb2d42ea264bab8d72e40cf1.jpeg) ![IMG_2120](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/8/4831a786e1e4f2c11effe9108019f58d83c1de9a.jpeg) ![IMG_2127](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/0/90c465a239fbd300731105510e8ef564f7a31dd9.jpeg)

Hey Will, that is correct, the process is:

1. Create the user via api (Succsesfully)
2. after, when I Get a user i see the PMI value in 0
3. To solve this I have to click user by user, in the zoom web page admin, and suddendly, after I click each user a PMI value is associatted.

The problem is that i need to create about 6000 users, so i can’t enter user by user to get the PMI value associated.

---

<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:** [November 18, 2020, 8:37pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/7 "2020-11-18T20:37:17Z")

</div>

Hi @juliancp,

Thank you for sharing these details.

To clarify, are the users you’re creating/testing with clicking on the account verification link in the auto-generated email before you’re making this GET request to retrieve their details?

Until the user is verified, you will receive placeholder information in the API response. Can you please let me know if you still see the issue after the user has verified?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![juliancp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/juliancp/32/7191_2.png) [@juliancp](https://devforum.zoom.us/u/juliancp)\
**Post date:** [November 18, 2020, 9:41pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/8 "2020-11-18T21:41:35Z")

</div>

Hi Will, happens that actually I am creating about 6000 users but they are not really people, this users are associated to subjects in the university like, Anatomy, Statistics, Algebra, etc. That’s the reason nobody enter to the account, we just need the Join URL (PMI value). But when i create this “users” the PMI value is always “0”. I have notice that when I enter to the account suddenly it is assigned a PMI value, but as I said before nobody enters to this accounts.

---

<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:** [November 19, 2020, 5:59pm UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/9 "2020-11-19T17:59:44Z")

</div>

Hi @juliancp,

I see—thanks for clarifying. I should note that the `create` action you’re using in your request to generate these users is intended for users who will be able to actually login and verify their account. So the behavior you’re experiencing right after creation is expected:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/6/864a6009c19bae4fb91ccfc991d29629acd18918.png)

For your specific use case, given the number of users and the fact they won’t actually log in, you might consider custCreate. However, note that this requires an additional Zoom plan.

Thanks,  
Will

---

<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:** [December 20, 2020, 3:59am UTC](https://devforum.zoom.us/t/when-create-a-user-via-api-does-not-get-a-pmi-value/35609/10 "2020-12-20T03:59:47Z")

</div>

Closed on December 20, 2020, 3:59am UTC

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