Welcome to the Alteryx Knowledge Base

How to Use Alteryx One's New OAuth 2.0 Refresh Tokens for the Alteryx One API
user

Created/Edited - 8/4/2026 by Pankaj Arya | Alteryx

How To

Overview


Alteryx One supports OAuth 2.0 authentication for secure access to APIs. OAuth access tokens and refresh tokens allow applications, scripts, and integrations to authenticate without requiring users to repeatedly log in.

This guide explains how to:
  • Generate OAuth 2.0 tokens
  • Use access tokens for Alteryx One API requests
  • Refresh expired access tokens
  • Manage rotating refresh tokens securely
  • Troubleshoot common authentication issues
Environment

Alteryx One

Prerequisites
Required Permissions:
  • Access to AAC User Preferences
  • Permission to generate OAuth 2.0 API Tokens

Prerequisites

Before starting, ensure you have:
• An active AAC account
• Permission to generate OAuth tokens
• Access to User Preferences → OAuth 2.0 API Tokens
• A secure credential storage solution (recommended):
Azure Key Vault
AWS Secrets Manager
HashiCorp Vault
Enterprise secret management solution

Recommended:
  • Administrative understanding of your AAC tenant/workspace
  • Familiarity with REST APIs and OAuth concepts
 
Procedure

Important OAuth Token Concepts

 
Access Token
An access token is used to authenticate API requests to Alteryx One.

Characteristics:
  • Short-lived
  • Used in the Authorization: Bearer header
  • Must be refreshed after expiration

Example:
Authorization: Bearer eyJhbGciOi...


Refresh Token
A refresh token is used to generate a new access token after the access token expires.

Characteristics:
  • Longer-lived than access tokens
  • Sensitive credential requiring secure storage
  • Rotates after every successful refresh request


IMPORTANT:

Each time you refresh a token, Alteryx One returns:

  • A new access token
  • A new refresh token

 

The previous refresh token immediately becomes invalid.


Applications must always store the newest refresh token returned by Alteryx One.
Failure to replace the old refresh token can result in authentication failures.



Step 1 — Generate OAuth Tokens

  1. Log in to Alteryx One
  2. Navigate to:
  3. User Preferences → OAuth 2.0 API Tokens
  4. Generate a new token set
Alteryx One will return:
  • Access Token
  • Refresh Token
  • Client ID
  • Token Endpoint URL
Store all values securely.

IMPORTANT: The refresh token may only be visible once depending on tenant configuration.

Step 2 — Understand the Token Endpoint

Example Token Endpoint:
https://<region>.alteryxcloud.com/oauth2/token
 
Regional endpoints may differ between:
  • US regions
  • EU regions
  • APAC regions
Always use the endpoint associated with your AAC tenant.

Step 3 — Use the Access Token

Example API Request:
GET /v1/workspaces
Authorization: Bearer <access_token>
 
Example Curl:
curl -X GET \
  https://<tenant>/v1/workspaces \
  -H "Authorization: Bearer ACCESS_TOKEN"



Step 4 — Refresh the Access Token


When the access token expires, use the refresh token to request a new token pair.

Refresh Token Request

Curl Example:

curl -X POST "https://<tenant>/oauth2/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=refresh_token" \
  -d "client_id=<client_id>" \
  -d "refresh_token=<refresh_token>"



Python Example:

import requests

url = "https://<tenant>/oauth2/token"

payload = {
    "grant_type": "refresh_token",
    "client_id": "<client_id>",
    "refresh_token": "<refresh_token>"
}

headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())



Successful Refresh Response


Example:
{
  "access_token": "new_access_token",
  "refresh_token": "new_refresh_token",
  "expires_in": 3600,
  "token_type": "Bearer"
}
 

 

IMPORTANT: Immediately replace the old refresh token with the newly returned refresh token.
The old refresh token becomes invalid after use.

Token Lifecycle & Rotation Behavior


Access Token Lifecycle
  • Short-lived
  • Intended for API authentication only
  • Automatically replaced during refresh


Refresh Token Lifecycle

Refresh tokens rotate after each successful refresh operation.
This means:
1. Refresh token A generates:
Access token B
Refresh token B
2. Refresh token A is invalidated
3. Future refresh operations must use refresh token B



Common Operational Considerations


Parallel Refresh Requests
Avoid multiple systems refreshing the same token simultaneously.

This can cause:
  • One request to succeed
  • Other requests to fail due to token invalidation

Recommended:
  • Centralized token management
  • Token locking/mutex strategy



Automation Best Practices


Recommended:
  • Refresh tokens before expiration
  • Centralize token storage
  • Implement retry logic
  • Log authentication failures
  • Avoid hardcoding tokens in scripts



Security Best Practices


Recommended
  • Store tokens in encrypted secret stores
  • Rotate credentials regularly
  • Limit token exposure
  • Use least-privilege accounts



Avoid

  • Storing refresh tokens in plaintext
  • Embedding tokens in workflows
  • Sharing tokens across environments
  • Using personal accounts for production automation


Environment Considerations
DEV vs PROD

Use separate OAuth credentials for:
  • Development
  • Testing
  • Production
Do not reuse production refresh tokens in lower environments.

Regional Endpoints
Ensure:
  • Token endpoint
  • API endpoint
  • Workspace region
All match the same AAC environment.



Common Errors & Troubleshooting


Invalid Refresh Token

Possible Causes:
  • Old refresh token reused
  • Token already rotated
  • Token revoked

Resolution:
  • Use the latest refresh token returned by Alteryx One


Unauthorized Client

Possible Causes:
  • Incorrect Client ID
  • Invalid OAuth configuration

Resolution:
  • Validate client information from Alteryx One User Preferences


Expired Access Token

Possible Causes:
  • Access token lifetime exceeded

Resolution:
  • Refresh the token using the current refresh token


Tenant or Region Mismatch

Possible Causes:
  • Incorrect token endpoint
  • Wrong Alteryx One region

Resolution:
  • Verify regional URLs and tenant endpoints



Audit & Logging Recommendations


For troubleshooting:
  • Capture request timestamps
  • Record HTTP response codes
  • Log correlation/request IDs when available
  • Retain token refresh audit history

Recommended logs for Support:
  • Token endpoint used
  • HTTP response payload
  • API request timestamp
  • Workspace/tenant region
Do NOT share active refresh tokens in Support cases.

Revocation & Access Changes

Tokens may become invalid if:
  • User account is disabled
  • Password reset policies invalidate sessions
  • OAuth tokens are manually revoked
  • SSO/IdP changes impact account identity

If authentication suddenly fails:
  • Regenerate tokens
  • Validate account status
  • Confirm SSO identity alignment



Frequently Asked Questions

  • Does Alteryx One support OAuth 2.0?
    • Yes. AAC supports OAuth 2.0 token-based API authentication.
  • Are refresh tokens reusable?
    • No. Alteryx One uses rotating refresh tokens.
    • Each refresh operation invalidates the previous refresh token.
  • Should refresh tokens be shared?
    • No. Refresh tokens should be treated as sensitive credentials.
  • Can tokens be used across environments?
    • No. Tokens are tenant/environment specific.
Was this article helpful?