I’m creating a zoom meeting using following way, whatever the duration i put in the request body, the duration in response is always 60 , what am i doing wrong here and how can i increase the duration of meeting?
Request URL: https://api.zoom.us/v2/users/{host_id}/meetings
Request body:
` {
"json": {
"topic": "Test Agenda",
"type": 2,
"start_time": "2023-04-19T18:25:43.511Z",
"duration": 85,
"settings": [
{
"host_video": false,
"participant_video": false,
"cn_meeting": false,
"in_meeting": false,
"join_before_host": false,
"mute_upon_entry": true,
"watermark": false,
"use_pmi": false,
"approval_type": 0,
"audio": "voip",
"auto_recording": "none",
"enforce_login": false,
"waiting_room": true,
"registrants_email_notification": false
}
]
}
}
`
Hi @abhishekkumar
Thanks for reaching out to the Zoom Developer Forum and welcome to our community!
Are you getting the duration as 60 in your response body?
I am not able to replicate this behavior, whatever duration number I pass, I get the same in the response body.
Please note that this duration won’t affect your meeting, what I mean by this is that you will be able to host the meeting for 85min even if the response body comes as 60
Hope this helps,
Elisa
It seems like the issue is with the settings
parameter in your request body. According to the Zoom API documentation, the settings
parameter is an object that contains various settings for the meeting, such as host_video
, participant_video
, join_before_host
, etc.
To set the duration of the meeting, you should use the duration
parameter outside of the settings
object, as you did in your example request body. The duration
parameter specifies the duration of the meeting in minutes.
Therefore, try modifying your request body as follows:
{
“topic”: “Test Agenda”,
“type”: 2,
“start_time”: “2023-04-19T18:25:43.511Z”,
“duration”: 85,
“settings”: {
“host_video”: false,
“participant_video”: false,
“cn_meeting”: false,
“in_meeting”: false,
“join_before_host”: false,
“mute_upon_entry”: true,
“watermark”: false,
“use_pmi”: false,
“approval_type”: 0,
“audio”: “voip”,
“auto_recording”: “none”,
“enforce_login”: false,
“waiting_room”: true,
“registrants_email_notification”: false
}
}
In this modified request body, the duration parameter is outside of the settings object and should correctly set the duration of the meeting to 85 minutes.
I hope it’ll help.
1 Like
Also, can the server to server oauth access Token expiry time be increased to more than 1 hour? @charles1237718 @elisa.zoom
It looks like the issue might be with the way you’re formatting the request body. The settings
object should be a JSON object, not an array. Try modifying the request body like this:
jsonCopy code
{
"topic": "Test Agenda",
"type": 2,
"start_time": "2023-04-19T18:25:43.511Z",
"duration": 85,
"settings": {
"host_video": false,
"participant_video": false,
"cn_meeting": false,
"in_meeting": false,
"join_before_host": false,
"mute_upon_entry": true,
"watermark": false,
"use_pmi": false,
"approval_type": 0,
"audio": "voip",
"auto_recording": "none",
"enforce_login": false,
"waiting_room": true,
"registrants_email_notification": false
}
}
In the above request body, the settings
object is a JSON object rather than an array. Once you modify the request body and send the request, the duration of the meeting should be the same as the one you specified in the request body.
2 Likes
Thanks for chiming in @anawilliam850 I did not catch the fact that @abhishekkumar is sending the settings object as an array! Good catch
@abhishekkumar about your second inquiry, no you can not increase the expiration time of the Server to Server Oauth token, it is 1 hour by default and it is important to note that if you generate a new token before the one that you are using is expired, the generation of a new token will invalidate the previous one.
Hope this helps!
Elisa
1 Like