Request failed with status code 401

Hi, i trying to create a new meeting with the api ang i get error 401.
this is the url- …/v2/users/me/meetings
I already check and my token is working.
this is the request if someone will know why it dont work:

const options = {
method: “POST”,
url: …/v2/users/me/meetings,
headers: {
Authorization: Bearer ${accessToken},
“Content-Type”: “application/json”,
},
data: {
topic: “Learn how to use the Zoom API”,
type: 2,
start_time: “2024-08-25T16:32:55Z”,
duration: 60,
timezone: “Asia/Kolkata”,
password: “zoom123”,
agenda: “Learn how to use the Zoom API”,
whiteboard: true,
settings: {
host_video: true,
participant_video: true,
join_before_host: true,
mute_upon_entry: true,
watermark: false,
use_pmi: false,
waiting_room: false,
approval_type: 2,
registration_type: 2,
audio: “both”,
auto_recording: “cloud”,
enforce_login: false,
enforce_login_domains: “”,
alternative_hosts: “”,
global_dial_in_countries: ,
registrants_email_notification: true,
},
recurrence: {
type: 1,
repeat_interval: 1,
weekly_days: “2”,
end_times: 10,
},
},
};

thank you :slight_smile:

Hi @omer6688
Thanks for reaching out to us!
You are passing a recurrence object but the meeting type is 2.
Try getting rid of the recurrence object if you are not trying to schedule a recurring meeting or change the meeting type to 8 if you are looking to set up a recurring meeting