Greetings - I am trying to call a REST API method from within my PHP code (for a wordpress website).
The REST API method is “Add Meeting Registrant” or /meetings/{meetingId}/registrants
I have created a valid JSON web token using the JWT.IO library (Firebase) and validated it on the JWT.io validation page.
Then I setup rest of the information needed for that API call and use the ZOOM example curl code to make the call. But no matter what I do I keep getting a Code:124 “Invalid Access Token” back as the response object.
1st Question: Does this particular API method support JWT authentication?
2nd Question: Is it working or are there any known issues using JWT for this API method call?
I cannot post my code here BUT I have emailed it to developersupport@zoom.us so that you can take a look at it further. The code looks right to me - wondering if it’s something going on, on the ZOOM side that’s causing this error?
If the JWT token works for that meeting ID in the documentation, please let me know, if not then the token that you are receiving is invalid. I would recommend you to check your API key and Secret again.
I ran this test. I verified the JWT with jwt.io. When I send a test request I am still getting the same error 124 “Invalid Access Token”
AND I have checked and checked again the KEY and SECRET and they are both correct.
I sent you a lot more details via email to developersupport@zoom.us.
PLEASE see if you can determine what I am missing, or what I am doing different that you did.
I responded to you via email. Also we are currently updating our JWT documentation. I am hoping to have an update for you by monday. Thank you for waiting.
Ojus - I followed the instructions per your email. When I went into the marketplace, created the new temp app, it created a different KEY and SECRET than the one’s that are in “settings” for this ZOOM account. So I tried that KEY and SECRET and IT WORKED! THANKS!
But now I am getting an “Invalid MeetingId” message. In this account there is a meeting called “Mark Test Meeting” with Meeting Id “***********”. So I have tried both of these URLs:
So with and without the dashes. Do I need to place the Meeting ID in any of the data that I pass into this REST API call, or is it just used in the URL? I’m not sure why I am getting the “Invalid MeetingID” returned from the REST API call. Can you help?
Thanks - Mark
*This post has been edited to remove any meeting / webinar IDs
I created just a standard scheduled meeting and when I was done it gave me a unique Meeting ID. So I am not using the Personal Meeting ID (this option is unchecked). So it looks like this:
There’s a different meeting ID that looks like “wILdStr1nG5=0mY” and I think that’s the one the API needs. In the forum, if you search for “double encode”, there’s a few examples.
The encoding would be URL encoding, but numbers and hyphens don’t change with URL encoding, so that shouldn’t be the problem.
The UUID is the value that I was thinking of. I think you can get it using the “List Meetings” API call:
The documentation for the registrants and meeting API calls say “integer” for the meetingId, so I would expect it wants the number with no hyphens. I’ll run a test on my setup.
In my testing, the meetingId must be an integer. When I tested with the registrants API call, it correctly gave me the error “This meeting has not registration required”.
An interesting side note for 32-bit systems: The Meeting ID can overflow a 32-bit integer on Personal Meeting IDs higher than 214-748-3647. In those situations, you may want to treat the integers 2147483648 and higher as a string.
Now once I have the JSON string I presume I need to convert it into a PHP class object that looks like the above, with an array of meeting objects inside it. That way I can iterate over array of meetings and find the one that I want. Do you have these objects already defined in PHP classes (code) somewhere, or do I just create PHP classes that look like these objects myself? In other words how do I go about taking that giant JSON string and reworking it so I can pull certain meetings and ID’s from it? Can you point me to some PHP code perhaps?
There’s some complicated stuff you can do with pages, but as long as page_count is 1, there’s only one page to look at. You may want to make sure you are sending page_size 300 in your request so that you don’t have to make as many requests to get all of the data. Of course, if you only want a small number of results returned, setting the page_size lower will result in faster responses.
The Meeting UUID seems to only be used in other function calls like past_meetings/{meeting_uuid}. By default, they mean Meeting ID, which is in the 'id' field in the 'meetings' array.