Access token invalided

If i create a meeting using API ,then showing error {“code”:124,“message”:“invalid access token, this access token is not supported as query parameter string”}

So i couldn’t create meeting . Please help me .

Hi @hbetancur
It looks like you are passing the access token as a query parameter.
We recently made some security enhancements to the way we manage access tokens, learn more about that here:

https://marketplace.zoom.us/docs/guides/auth/oauth/#step-2-request-access-token

Hope this helps,
Elisa

const clientId = ‘xxxxxxxxxxxxxxxxxxxxxxxxxx’;
const redirectUri = ‘https://xxxxxxxxxxxxxxx/’;
const responseType = ‘code’;

	const authEndpoint = 'https://zoom.us/oauth/authorize';
	const authUrl = `${authEndpoint}?response_type=${responseType}&client_id=${clientId}&redirect_uri=${redirectUri}`;

	axios.get(authUrl, {
	  headers: {
		'Access-Control-Allow-Origin': '*'
	  }
	})
	  .then(response => {
		alert(response.data);
	  })
	  .catch(error => {
		alert(error);
	  });

Showing this error

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://zoom.us/oauth/authorize?response_type=code&client_id=q0zpHuuMSwuGujMbHNiKqQ&redirect_uri=http://127.0.0.1:8000. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.

How to fix this error. Please help me .

$CURL_URL = ‘https://api.zoom.us/v2/users/useremail/token?type=zak’;

	$curl = curl_init();

	curl_setopt_array($curl, array(
	  CURLOPT_URL => $CURL_URL,
	  CURLOPT_RETURNTRANSFER => true,
	  CURLOPT_ENCODING => '',
	  CURLOPT_MAXREDIRS => 10,
	  CURLOPT_TIMEOUT => 0,
	  CURLOPT_FOLLOWLOCATION => true,
	  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	  CURLOPT_CUSTOMREQUEST => 'GET',
	  CURLOPT_HTTPHEADER => array(
		'Authorization: <token>'
	  ),
	));

	$response = curl_exec($curl);

	curl_close($curl);
	echo $response;

showing error {“code”:124,“message”:“invalid access token”}
How to fix this error. Please help me .
I couldn’t generator access token. Please help me how to generator access token ?

Hi @hbetancur
Could you please specify what app type you are using to generate the access token?

// create a payload with the issuer and expiration time
const payload = {
iss: process.env.MIX_ZOOM_API_KEY,
exp: new Date().getTime() + 5000,
};

// sign the token using your API Secret
const acc_token = jwt.sign(payload, process.env.MIX_ZOOM_API_SECRET_KEY);

I am using JWT app type. Before using this code to generator access token and create zoom meeting successfully.
Now generator access token successfully, but if create zoom meeting api call then showing {“code”:124,“message”:“invalid access token, this access token is not supported as query parameter string”} error message.So how to fix this error and create zoom meeting. Please help us.

which type of app using for this issue to solve ?

Hi @hbetancur
As I mentioned in my previous post, the error you are getting is because of the way you are passing the access token when creating a meeting

Here is the documentation about how to use access token:

https://marketplace.zoom.us/docs/guides/auth/oauth/#using-an-access-token

Best,
Elisa

which type of app using for this issue to solve ?
Please reply me

Hi @hbetancur
Can you please share with me the request URL and request body that you are sending when creating the meeting so I can point you in the right direction?
The error you are seeing it’s not about the app type, it is because of the way you are passing your access token

Cheers,
elisa