fix: EU region frontend authentication#88
Open
is-isaac wants to merge 3 commits into
Open
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
URL-based tools (get_sheet_by_url, search_in_sheet_by_url, what_am_i_assigned_to_by_sheet_url) now detect whether the frontend URL points to the EU or US region and validate it against the configured SMARTSHEET_ENDPOINT. A region mismatch returns a clear, actionable error instead of an opaque auth failure. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This was referenced Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app.smartsheet.comvsapp.smartsheet.eu)SMARTSHEET_ENDPOINTregion before making API callsProblem
When EU region users pass
app.smartsheet.euURLs to URL-based tools (get_sheet_by_url,search_in_sheet_by_url,what_am_i_assigned_to_by_sheet_url), the tools extract the directIdToken but send it to whicheverSMARTSHEET_ENDPOINTis configured. If the endpoint is US but the sheet is EU (or vice versa), authentication fails silently because Smartsheet API keys are region-specific.The
claude_desktop_config-example.jsonalso omittedSMARTSHEET_ENDPOINTentirely, making misconfiguration very likely.Changes
src/utils/url-utils.tsparseSmartsheetUrl()extracts directIdToken + detects region from hostname;detectApiRegion()determines region from API base URL;validateRegionMatch()returns actionable error on mismatchsrc/apis/smartsheet-api.tspublic readonly region: SmartsheetRegionderived fromSMARTSHEET_ENDPOINTsrc/tools/smartsheet-sheet-tools.tsget_sheet_by_urlusesparseSmartsheetUrl()+validateRegionMatch()src/tools/smartsheet-search-tools.tssearch_in_sheet_by_urlandwhat_am_i_assigned_to_by_sheet_urlclaude_desktop_config-example.jsonSMARTSHEET_ENDPOINTto env config.env.exampleTest plan
"Region mismatch: the Smartsheet URL points to the EU region, but your SMARTSHEET_ENDPOINT is configured for the US region. Set SMARTSHEET_ENDPOINT to https://api.smartsheet.eu/2.0 and use a EU API token."npm run build)