Getting "Bad Request" when trying to create a new meeting

Basically im using a server to server OAuth app, ive authenticated with the credentials and recieved the access token, but when I try to make a request to “{myEmail}/meetings
I get code 400.

const request = await fetch(""+accountID,{
    method: 'POST',

    Host: "",
    /**The credential below is a sample base64 encoded credential. Replace it with "Authorization: 'Basic ' + Buffer.from(your_app_client_id + ':' + your_app_client_secret).toString('base64')"
    // Authorization: 'Basic abcdsdkjfesjfg',
    Authorization: 'Basic ' + Buffer.from(clientID + ':' + clientSecret).toString('base64')

const RequestIntoJSON = await request.json();
const AccessToken = RequestIntoJSON.access_token;

const CreateMeetingRequest = await fetch("{myEmail}/meetings",
        "Host": "",
        "Authorization": "Bearer " + AccessToken,

        "topic": "Discussion about today's Demo",
        "type": 2,
        // "start_time": "2021-03-18T17:00:00",
        "duration": 20,
        "timezone": "India",
        "password": "1234567",
        "agenda": "We will discuss about Today's Demo process",
        "settings": {
          "host_video": true,
          "participant_video": true,
          "cn_meeting": false,
          "in_meeting": true,
          "join_before_host": false,
          "mute_upon_entry": false,
          "watermark": false,
          "use_pmi": false,
          "approval_type": 2,
          "audio": "both",
          "auto_recording": "local",
          "enforce_login": false,
          "registrants_email_notification": false,
          "waiting_room": true,
          "allow_multiple_devices": true

console.log(await CreateMeetingRequest)

Hey @noureldinelshenawy20 !
Thanks for reaching out to the Zoom Developer Forum, I am happy to help here!

Could you please make sure that you are generating the Bearer token correctly??
Feel free to follow the steps in this guide to achieve what you are looking for:


I think I’m generating the Bearer token correctly, the response i get from (“”+accountID) is :
{ access_token: 'eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiJlOGMzZTk4ZS1jMWIwLTRmY2MtYjZkYS1lM2ViYTYyZmYzNzgifQ.eyJ2ZXIiOjcsPrw', token_type: 'bearer', expires_in: 3599, scope: 'meeting:master meeting:read:admin meeting:write:admin meeting_token:read:admin:live_streaming meeting_token:read:admin:local_archiving meeting_token:read:admin:local_recording recording:master recording:read:admin recording:write:admin user:master user:read:admin user:write:admin' }

Hey @noureldinelshenawy20
I edited your access token in the post. Please make sure not to share personal data in the forum.
Have you tried generating the meeting using Postman to make sure that this is not related to the way you are making the request?