Generate OAuth authorization code

Hi Tommy,

I am trying to use API via OAuth . Could you please help me with the below doubt.

  1. Can we generate the OAuth authorization code using PostMan?
    Every time we generate the access token and refresh token, we have to save the refresh token to generate access token again. I don’t want to use refresh token every time and want to check whether we can generate the OAuth authorization code via code or we have to always generate it manually via local test or generate auth url.

Regards
Mike

1 Like

Hi Guys,
Could you please on above request ?

Regards
Mike

Hey @contactbymail01,

Yes you can generate the Authorization code using Postman. Follow these instructions:

https://learning.postman.com/docs/postman/sending-api-requests/authorization/#oauth-20

Thanks,
Tommy

Hi Tommy,

Every time, when we try to generate auth code via Postman it goes to the login page always.

we are trying to implement in our paid zoom account but now to get auth code via the postman .

one I am able to Auth code I can generate token . but how to get auth code via postman in your link it shows how to get token via auth code

Regards

Mike

Hey @contactbymail01,

Sign-in is part of the OAuth flow.

If you want to call the APIs without the Sign in OAuth2 flow, you can use JWT Tokens instead.

Thanks,
Tommy

Hi @tommy

I think the question being asked is that we would like to test user apps which need OAuth login. It appears that when we try to automate the Oauth request we get into a 302 redirect loop from the server. It appears to be a javascript dependency. Can you explain

Hey @nitin1,

The OAuth flow requires user interaction for security purposes.

Thanks,
Tommy

For automation I was able to setup an automated process, which does not require user to interact continuously till the refresh token is valid.

For anyone else who is planning to do so, setup a temporary nodejs server and set the redirect uri for zoom auth as node. Now once the user authenticates, node can intercept the request and get a new access token.

Hey @nitin1,

You can also use JWT Tokens which are designed for server to server (no user interaction) authentication. :slight_smile:

Thanks,
Tommy

Thanks Tommy,

But I wanted to automate testing of user managed apps, where a user can add an app to their account. Will JWT work in that case as well ?

Hey @nitin1,

Ah gotcha! If you are setting up automated testing for OAuth apps then no, JWT should not be used.

Thanks,
Tommy