Skip to content

Commit

Permalink
docs: add new param options to example
Browse files Browse the repository at this point in the history
  • Loading branch information
sedenardi committed Apr 21, 2023
1 parent 3931e66 commit 41bc06e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,28 @@ import zoomApi from 'zoomapi';
// JWT app
const client = zoomApi({
apiKey: process.NODE_ENV.ZoomApiKey,
apiSecret: process.NODE_ENV.ZoomApiSecret
apiSecret: process.NODE_ENV.ZoomApiSecret,
webhookSecretToken: process.NODE_ENV.webhookSecretToken
});
// or Server-to-Server OAuth app
const client = zoomApi({
accountId: process.NODE_ENV.ZoomAccountId,
oauthClientId: process.NODE_ENV.ZoomOAuthClientId,
oauthClientSecret: process.NODE_ENV.ZoomOAuthClientSecret,
webhookSecretToken: process.NODE_ENV.webhookSecretToken,
/**
* optional function called when access token is retrieved
*/
onSetAccessToken: async (token) => {
return await setToken(token);
},
/**
* optional function to explicitly supply an access token,
* instead of fetching a new one
*/
onGetAccessToken: async () => {
return await getToken();
}
});

const users = await client.users.ListUsers();
Expand Down

0 comments on commit 41bc06e

Please sign in to comment.