# Trial account trying to create user using api v2 oauth PHP "\[message\] =\> Invalid api key or secret."

**URL:** <https://devforum.zoom.us/t/trial-account-trying-to-create-user-using-api-v2-oauth-php-message-invalid-api-key-or-secret/7643>\
**Category:** API and Webhooks\
**Created:** [January 22, 2020, 9:31pm UTC](https://devforum.zoom.us/t/trial-account-trying-to-create-user-using-api-v2-oauth-php-message-invalid-api-key-or-secret/7643 "2020-01-22T21:31:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![gregory.george.lewis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gregory.george.lewis/32/2974_2.png) [@gregory.george.lewis](https://devforum.zoom.us/u/gregory.george.lewis)\
**Post date:** [January 23, 2020, 3:24pm UTC](https://devforum.zoom.us/t/trial-account-trying-to-create-user-using-api-v2-oauth-php-message-invalid-api-key-or-secret/7643/6 "2020-01-23T15:24:59Z")

</div>

Right now I’m using this on localhost (my laptop). Not sure if it’s important.

I found a similar problem here: [https://devforum.zoom.us/t/help-with-api-create-meeting-with-php/5189/5](https://devforum.zoom.us/t/help-with-api-create-meeting-with-php/5189/5)

I implemented the solution on that page, so now my cURL code looks like this:

```
        $headers = array(
                          "authorization: Bearer {$params['access_token']}",
                          "content-type: application/json"
                        );
        
        $curl = curl_init();
        curl_setopt_array($curl, array(
                                        CURLOPT_URL => "https://api.zoom.us/v2/users",
                                        CURLOPT_SSL_VERIFYPEER => false,
                                        CURLOPT_RETURNTRANSFER => true,
                                        CURLOPT_POST => true,
                                        CURLOPT_POSTFIELDS => json_encode(array(
                                            'action' => 'create',
                                            'user_info' => array(
                                                                 'email' => 'earthboar@gmail.com',
                                                                 'type' => '1',
                                                                 'first_name' => 'Gregory',
                                                                 'last_name' => 'George'
                                                                )
                                        )),
                                       )
        );
        CURL_SETOPT($curl,CURLOPT_HTTPHEADER, $headers);
        $response = curl_exec($curl);
        curl_close($curl);

```

This results in :

```
stdClass Object
(
    [code] => 200
    [message] => Invalid api key or secret.
)

```

Is an “api key or secret” different from the client\_id and client\_secret? Do I need to include an api\_key & api\_secret in addition to the access\_token?

---

_[View the full topic](https://devforum.zoom.us/t/trial-account-trying-to-create-user-using-api-v2-oauth-php-message-invalid-api-key-or-secret/7643)._
