Welcome to the Alteryx Knowledge Base
Created/Edited -
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
Alteryx One
- Access to AAC User Preferences
- Permission to generate OAuth 2.0 API Tokens
Prerequisites
• 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
Important OAuth Token Concepts
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
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
- Log in to Alteryx One
- Navigate to:
User Preferences → OAuth 2.0 API Tokens- Generate a new token set
- Access Token
- Refresh Token
- Client ID
- Token Endpoint URL
IMPORTANT: The refresh token may only be visible once depending on tenant configuration.
Step 2 — Understand the Token Endpoint
Example Token Endpoint:
- US regions
- EU regions
- APAC regions
Step 3 — Use the Access Token
Example API Request:
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:
-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
- 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
Regional Endpoints
Ensure:
- Token endpoint
- API endpoint
- Workspace region
Common Errors & Troubleshooting
Invalid Refresh Token
Possible Causes:
- Old refresh token reused
- Token already rotated
- Token revoked
- Use the latest refresh token returned by Alteryx One
Unauthorized Client
Possible Causes:
- Incorrect Client ID
- Invalid OAuth configuration
- Validate client information from Alteryx One User Preferences
Expired Access Token
Possible Causes:
- Access token lifetime exceeded
- Refresh the token using the current refresh token
Tenant or Region Mismatch
Possible Causes:
- Incorrect token endpoint
- Wrong Alteryx One region
- 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
- Token endpoint used
- HTTP response payload
- API request timestamp
- Workspace/tenant region
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
- 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.