Salesforce integration: Apex batch process & user context

Hi! I’ve got the Salesforce-Zoom app installed in my Salesforce org to support remote student advising. To help with this process, I’ve got a batch Apex job that that will find all the student meetings in Salesforce (sync’d as events from the advisors calendar), and then convert them all to Zoom meetings by editing the event and checking the appropriate checkboxes.

This works for my events, but when I try to convert an advisor’s events, I get a “you are not an assigned scheduler” error. If the user adds me as a scheduler in Zoom, then it runs fine.

Obviously, I don’t want to ask all 400+ of my Salesforce users to add me as a scheduler. Is there any way to get my batch process to run in the context of the Zoom app, instead of me as a user?

Thanks!
Sue Irvine
Salesforce Developer
Cornell University

Hey @sti1,

Are you trying to edit an existing Zoom meeting hosted by let’s say Host A and switch the host to Host B?

If so, all the respective hosts would need you to be an assigned scheduler.

If the Zoom meeting does not exist yet, you could just Create the meeting for the respective host.

Thanks,
Tommy?

Hey Tommy, and thanks for the reply.

I’m taking an Outlook meeting (non-Zoom) and creating a Zoom meeting from it, without changing the host. I’ll take a look at the API - will that put the request through on behalf of the meeting host? (and not need scheduler privileges?) I see that the API has a limit of 100 requests per user/per day. If the requests are made on behalf of me as the user we could come close to that. If it counts towards the meeting host, then we’ll be fine.

Thanks!
Sue

Also - can I use my existing JWT app to create meetings (for users other than myself) or do I need to use oAuth? I’ve got some code that seems to be working (generating a JWT token), but I’m getting an “invalid access token” response.

Thanks!

@sti1

JWT apps are unique from all other app types because they are:

  • Bound to the account (cannot be shared)
  • Are long-lived tokens
  • Have access to all APIs for the account on which they’re created

We have received several reports, and are actively working on a solution for the error you mentioned.

In the meantime, please DM me: Your Zoom Account ID, JWT Client ID and Client Secret please.
We have had several developers successfully work-around this issue by deactivating and then re-activating the JWT app (try that in addition to sending me the data requested so we can reset your JWT app manually please).

In regards to the rate limit question you asked. The limit is 100 meetings max can be created on any specific user within a 24 hour cycled window of time. It doesn’t matter where/how these meetings are created on the user (scheduler, API, manually via Client/Portal)…they all count towards the 100 max per 24 hours. Does this help answer your question?

Thanks,
Ben

I think I’ve got this sorted now! I’m authenticating with the JWT app, and am able to create meetings. Thanks!

Sue

1 Like

Happy to hear you got it sorted out! :slight_smile:

-Tommy