# Create users using JWT app credentials in PHP

**URL:** <https://devforum.zoom.us/t/create-users-using-jwt-app-credentials-in-php/36126>\
**Category:** API and Webhooks\
**Created:** [November 16, 2020, 3:00pm UTC](https://devforum.zoom.us/t/create-users-using-jwt-app-credentials-in-php/36126 "2020-11-16T15:00:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mateoramos97](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mateoramos97](https://devforum.zoom.us/u/mateoramos97)\
**Post date:** [November 16, 2020, 3:00pm UTC](https://devforum.zoom.us/t/create-users-using-jwt-app-credentials-in-php/36126/1 "2020-11-16T15:00:55Z")

</div>

**Description**

Im trying to create a user but im not a php expert, I have to do it this way because I have a WordPress site and need to implement PHP, I want to use JWT credentials instead the access token like Zoom API reference shows, Could somebody help me with the code generation using JWT credentials to create a new user, I use a masteraccount to do it

**Error**  
The full error message or issue you are running into.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT  
**Which Endpoint/s?**  
Create User

---

<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 17, 2020, 7:34pm UTC](https://devforum.zoom.us/t/create-users-using-jwt-app-credentials-in-php/36126/2 "2020-11-17T19:34:07Z")

</div>

Hey @mateoramos97,

Happy to help—you can use this code snippet to send a request to our Create User endpoint in PHP:

```auto
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.zoom.us/v2/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"action\":\"create\",\"user_info\":{\"email\":\"dhjdfkghdskjf@fgkjfdlgjfkd.gh\",\"type\":1,\"first_name\":\"Terry\",\"last_name\":\"Jones\"}}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {token}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

```

Make sure to replace `{token}` with your JWT token.

Hope this helps!

Best,  
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 18, 2020, 5:34am UTC](https://devforum.zoom.us/t/create-users-using-jwt-app-credentials-in-php/36126/3 "2020-12-18T05:34:17Z")

</div>

Closed on December 18, 2020, 5:34am UTC

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