We are trying to replace our JWT App before the June deadline. I’ve created an Oauth App and set it up so that it redirects to Salesforce where we’ve set up a Named Credentials and an Auth Provider so that it can process the access token from Zoom. However I’m running into the error below when I try to add the App.
No_Oauth_State: State was not sent back
This error is provided from Salesforce when the redirect URL is followed.
I looked in the docs and I see that State is an optional parameter and I don’t see it in the “Add URL” url provided by the app. How do I set my app up so that it provides this state variable? I tried entering a dummy state variable into the redirect url and then I get the error that state is invalid so I’m not sure what is expected here.
Thanks for the tag, @cmcgloin! The state variable can be any random value as long as the call back URL state variable matches with the salesforce state propagate value. More details on this topic be found in this post:
Thank you so much for getting back to me @donte.zoom - I really appreciate it. So the docs you linked indicated that the state variable should be a hash of the session Id. How would I access that from the App UI?
What language are you using to implement OAuth? I am happy to get you a code sample to reference for your implementation. Also, please provide a detailed description of the workflow you are looking to implement.
Thanks @donte.zoom . We are doing this in Salesforce so writing it in Apex (essentially Java).
So an example of one of our workflows currently is that we’ll have some records in Salesforce which represent events we will run for our Members. If the meeting has a virtual option, then the user will set up a Zoom meeting and populate the Meeting Id into a field in Salesforce. If that field is populated, then we have coding automation set up which calls out to Zoom, retrieves the information such as dial in information about the meeting and populates it back on to the virtual event meeting.
Currently we use a JWT app for authorizing the callout to Zoom from Salesforce, but moving forward we will have to use the new Oauth apps instead. So as I understand things we’ll do the following:
Authenticate into the Oauth app and get a token
Take the token from the app
Callout to Zoom using the token and get the information about the Zoom Meeting
Retrieve the information and do our Salesforce automation
Does that help clarify what we’re trying to do? I’m not sure how to get the Session ID from Zoom before we authenticate into the App.
Thanks for getting back to me @gianni.zoom - so this for a custom OAuth app, not using the standard Salesforce sync. We are looking to auth and then use the details to complete some other automation within the code.
Would the standard Salesforce app be a better use case for that?
Hey @gianni.zoom - we tried the Zoom app but unfortunately it requires too many custom fields on the Activity object in Salesforce. Due to business needs we will not be able to clear out that many custom fields for the Zoom app to be used.
Can you please try and clarify how we can pass through a state variable when setting up an OAuth app? I don’t see anything in the setup guide but I know I must be missing something simple. Thanks!