@zapier/ai-actions
:
AiActions
client with the API key:
AiActionsAuth
object@zapier/ai-actions
provides a helper class to handle the auth process.
This is done with the AiActionsAuth
class:
@zapier/ai-actions
uses the OAuth 2.0 PKCE flow to facilitate the OAuth process. As part of this, a “code verifier” is generated.
AiActionsAuth
will store the verifier in the browser’s
localStorage
.This is not recommended for production use since it can be easily accessed
by malicious scripts, and it will not work server-side.AiActionsAuth
has options that can be used.
AiActionsAuth
object, you can use it to generate the authorization URL:
redirectUri
you provided.
redirectUri
that you provided.
redirectUri
you provided along with a code
query parameter.
This code
can now be used to get an access token
refreshToken
method along with the refresh_token
: