UPS API Integration - 401 “Invalid Authentication Information” Error
Problem Summary
I’m getting a 401 authentication error when trying to create UPS shipments via their API in n8n, despite having OAuth2 credentials configured.
Error Message
401 - "{"response":{"errors":[{"code":"250002","message":"Invalid Authentication Information."}]}}"
Current Setup
Workflow Overview:
-
HTML Form (GET/POST webhooks)
-
Code node for data parsing
-
Switch node (label creation vs pickup only)
-
HTTP Request node for UPS API call
-
Function node to extract label
-
Response nodes
HTTP Request Node Configuration:
-
Method: POST
-
URL:
https://wwwcie.ups.com/api/shipments/v2403/ship
-
Authentication: Generic Credential Type → OAuth2 API
-
OAuth2 Credential: “Unnamed credential 3” (configured)
-
Headers:
-
Content-Type: application/json
-
Accept: application/json
-
OAuth2 Credential Configuration
I have an OAuth2 credential configured with:
-
Grant Type: Client Credentials
-
Client ID and Secret from UPS Developer account
-
Using UPS CIE (Customer Integration Environment) for testing
What I’ve Tried
-
Verified UPS account and developer credentials
-
Double-checked client ID and secret
-
Confirmed account number (KX5262) is correct
-
Still getting 401 errors
Questions
-
UPS API Endpoints: Should I be using
wwwcie.ups.com
(test) oronlinetools.ups.com
(production)? Documentation is unclear. -
OAuth2 URLs: What are the correct OAuth2 endpoints for UPS?
-
Authorization URL: ?
-
Token URL: ?
-
-
Required Headers: Does UPS API require additional headers like
transactionId
ortransId
? -
Alternative Approach: Should I manually handle OAuth2 token generation instead of using n8n’s built-in OAuth2 authentication?
Environment
-
n8n version: [Current]
-
UPS Environment: CIE (Customer Integration Environment)
-
Region: Germany/Europe
Screenshots
[Error output showing 401 with AxiosError details]
Has anyone successfully integrated UPS shipping API with n8n? Any help would be greatly appreciated!
Tags: #ups #api oauth2 #shipping #authentication #401error