# string(50) "{"code":124,"message":"Access token is required."}" - PHP

**URL:** <https://devforum.zoom.us/t/string-50-code-124-message-access-token-is-required-php/1348>\
**Category:** API and Webhooks\
**Created:** [June 12, 2018, 9:58am UTC](https://devforum.zoom.us/t/string-50-code-124-message-access-token-is-required-php/1348 "2018-06-12T09:58:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arghya\_Saha](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Arghya\_Saha](https://devforum.zoom.us/u/Arghya_Saha)\
**Post date:** [June 12, 2018, 9:58am UTC](https://devforum.zoom.us/t/string-50-code-124-message-access-token-is-required-php/1348/1 "2018-06-12T09:58:34Z")

</div>

When I call the meeting API for create new meeting it will show the following error

string(50) “{“code”:124,“message”:“Access token is required.”}”

&nbsp;

\<?php

$header = array(  
&nbsp;&nbsp;&nbsp; ‘Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50SWQiOiJCWGNNRmRfTFRuZU1oZEpiRnhDcVlBIiwiY2xpZW50SWQiOiJMZE05a3dOQVE3YXc1b1N3Uk1Qc2ZBIiwic2NvcGVzIjpbeyJuYW1lIjoibWVldGluZzp3cml0ZSIsInBhcmFtcyI6W119LHsibmFtZSI6InVzZXI6cmVhZCIsInBhcmFtcyI6W119LHsibmFtZSI6InJlY29yZGluZzp3cml0ZSIsInBhcmFtcyI6W119LHsibmFtZSI6IndlYmluYXI6d3JpdGUiLCJwYXJhbXMiOltdfV0sInRva2VuVHlwZSI6ImFjY2Vzc190b2tlbiIsImV4cCI6MTUyODc5ODk3NywidXNlcklkIjoiQlZBNXlkbWtTbENOVC1STWNCakdQZyIsImlhdCI6MTUyODc5NTM3NywianRpIjoiOWFmZWI3NTQtZGQ0ZS00NTBlLTkzZWMtMThjNmI3ZDhjMDJkIn0.aY4DYi6FPb8pbuoIPVx44pRVsDSvr9usTPluBzD1xbI’  
);  
$post = [  
&nbsp;&nbsp;&nbsp; ‘topic’&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =\> ‘Zoom example meeting 1’,  
&nbsp;&nbsp;&nbsp; ‘type’&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =\> ‘2’,  
&nbsp;&nbsp;&nbsp; ‘start\_time’ =\> ‘2018-02-10T08:00:45+00:00’,  
];

$ch = curl\_init(‘[https://api.zoom.us/v2/users/me/meetings](https://api.zoom.us/v2/users/me/meetings)’);  
curl\_setopt($ch, CURLOPT\_HTTPHEADER, $header);  
curl\_setopt($ch, CURLOPT\_RETURNTRANSFER, true);  
curl\_setopt($ch, CURLOPT\_POSTFIELDS, $post);

// execute!  
$response = curl\_exec($ch);

// close the connection, release resources used  
curl\_close($ch);

// do anything you want with your response  
var\_dump($response);

?\>

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [June 12, 2018, 4:43pm UTC](https://devforum.zoom.us/t/string-50-code-124-message-access-token-is-required-php/1348/2 "2018-06-12T16:43:42Z")

</div>

Hi Arghya,&nbsp;

Have you tried calling the same API and token using POSTman or any other API development tool? If it works with Postman, it may be an issue with your code.&nbsp;

Thanks

Michael

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 5:49pm UTC](https://devforum.zoom.us/t/string-50-code-124-message-access-token-is-required-php/1348/3 "2020-08-21T17:49:06Z")

</div>

Closed on August 21, 2020, 5:49pm UTC


