"errorCode": 1002, "message": "Your Access Token is invalid." EU
When I tired accessing the sheet, I was getting invalid access token. But after changing the region [EU]. Now I'm able to access the Smartsheet's' data.
Code :
import smartsheet
# Replace with your actual API key and sheet ID
api_key = "Your API key" # Ensure this is a valid API key
sheet_id = valid sheet ID (num) # Replace with a valid sheet ID
# Initialize Smartsheet client for EU region with API key
client = smartsheet.Smartsheet(api_key, api_base="https://api.smartsheet.eu/2.0")
try:
# Retrieve sheet details
sheet = client.Sheets.get_sheet(sheet_id)
print("Columns in the sheet:")
for column in sheet.columns:
print(f"Name: {column.title}, ID: {column.id}")
except smartsheet.exceptions.ApiError as e:
print(f"Smartsheet API Error: {e}")
except Exception as e:
print(f"An error occurred: {e}")
Answers
-
hi @Prasanth_reddy,
US domain and EU domain are completely different instances that are not having the same data inside.
if you create sheet in EU domain is not visible at all in US domain and you cannnot share it with someone from US domain etc. the only way to have it in US domain would be to export to excel and import to US domain etc.
that could be your issue hope it helps.
The Real Smartsheet Enthusiast
Is there anything else we can help you with? - book your time.
MASA Consult - Your Aligned Smartsheet Gold Partner
Find us on LinkedIn & Check our Smartsheet Solutions!
Tag my name: @kowal if you want me to respond :)
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.7K Get Help
- 438 Global Discussions
- 152 Industry Talk
- 497 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 509 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 307 Events
- 36 Webinars
- 7.3K Forum Archives