This API does not support client credentials for authorization while migrating from jwt to oauth

while trying to migrate authentication code from JWT token to oauth we are getting following error message:
data: {
code: 124,
message: ‘This API does not support client credentials for authorization.’
}
}
}
(node:7120) UnhandledPromiseRejectionWarning: Error: Request failed with status code 401

Hi @dealmoney , I have seen this with developers attempting to use Server-to-Server OAuth incorrectly:

Please note that Meeting SDK JWT is different from the deprecated JWT app-type. Meeting SDK JWT is still valid. Auth directions are here: Meeting SDK Auth
image

We are getting below error while creating meeting by using sever to server auth token.

Error: data: { reason: ‘Bad Request’, error: ‘invalid_request’ }

Our meeting Creation Funtion:
async function createZoomMeeting(accessToken) {
try {
const meetingData = {
topic: ‘Sample Meeting’,
type: 2, // 2 for scheduled meeting
};

const response = await axios.post(
  'https://api.zoom.us/v2/users/'+'test@gmail.com'+'/meetings',
  meetingData,
  {
    headers: {
      Authorization: `Bearer ${accessToken}`,
    },
  }
);
  console.log("meetingssssssss",response);
return response.data;

} catch (error) {
console.error(‘Error creating Zoom meeting:’, error);
throw error;
}
}

HI @dealmoney ,

Can you confirm you have a valid token?

With a valid S2S token, can you successfully make the request in Postman? Postman

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