Retrieving and Using a User Access Token
The Workflow API uses OAuth 2.0 authentication with the authorization code grant type. At the end of the Oauth authentication code flow, you’ll get a User Access Token that you’ll pass in a header with each API request.1
Configure a redirect URI
You can configure one (or multiple) redirect URIs in the Zapier Developer Platform under 
Embed → Settings → Redirect URIs
2
Get your Client ID and Client Secret
You can find your Client ID and Client Secret in the Zapier Developer Platform under 
Embed → Settings → Credentials
Regenerating your client secret will invalidate any previous secret.
3
Determine which OAuth scopes are required for your use case
The various endpoints of the Zapier Workflow API require different OAuth scopes. Review the OAuth scopes reference for the complete list of available scopes. Information on specific scopes required is included within the API reference for each endpoint.

4
Initiate the OAuth flow and get the user's permission.
Construct a URL like the one below (with your own redirect url, client id, OAuth scopes, etc.) and open a browser to that URL.Here’s an explaination for each query parameter:When the user visits this URL, Zapier’s authorization server will present them with a prompt asking if they would like to authorize your application’s request.
A full example would be:

5
Receive a Redirect at your Redirect URI
If the user approves the above request, then Zapier’s authorization server will redirect the browser back to the
redirect_uri that you specified and configured earlier. Two query string parameters, code and state will also be included.For example, the browser would be redirected to:6
Exchange authorization code for an access token
The final step is to exchange the authorization code that you just recieved for an access token that can be used to make authorized requests to the Zapier Workflow API. You make the exchange with a
POST request to Zapier’s token endpoint https://zapier.com/oauth/token/.Below is an example of a request that can be used to do the exchange.Note that, in addition to client id and secret being passed as a Basic Authentication header as above, they can be
passed as part of the body, using the keys
client_id and client_secret.You’ll recieve a response that looks like this:This response contains the
access_token that you’ll use to make API request on the user’s behalf, as well as a refresh token.7
Using the access token
The access token should be passed with requests as an
Authorization header. For example:8
Refreshing the access token
All access tokens will expire after 10 hours (the number of seconds in Note that you will receive a new refresh token - the old refresh token can no longer be used again, and so the new refresh token should be stored securely for future use. Refresh tokens don’t have an expiration date - they only expire when they are used to get a new access token.
expires_in), for security purposes. After that point, any request using that access token will return a 401 status code. To proceed, the refresh token should be exchanged for a new access token and a new refresh token. This will not require any interaction by the user.Below is an example request that can be used:You’ll receive a response that looks like this: