Sign in to Onshape
onshape_loginAuthenticate to Onshape by opening a browser for API key or OAuth login, verify credentials, and store them for secure access.
Instructions
Sign in to Onshape by opening a browser. method='api_key' (default) opens a local page that links to the Onshape developer key page and accepts the pasted key pair. method='oauth' runs the OAuth 2.0 authorization-code flow against an app you registered in the Onshape developer portal. The credential is verified against Onshape and stored in the OS keychain. Returns immediately with status 'pending' if the user has not finished yet — poll with onshape_login_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Loopback port for the callback (OAuth default 8471). | |
| scope | No | Space-separated OAuth scopes, when the app needs them stated. | |
| store | No | Where to keep the credential: auto (keychain, else file), keychain, or file. | |
| method | No | Login method (default api_key). | |
| base_url | No | Onshape API base URL (default https://cad.onshape.com). | |
| client_id | No | OAuth client id; also read from ONSHAPE_OAUTH_CLIENT_ID. | |
| oauth_url | No | OAuth server (default https://oauth.onshape.com). | |
| wait_seconds | No | Seconds to wait for the browser before returning (default 20). | |
| client_secret | No | OAuth client secret; also read from ONSHAPE_OAUTH_CLIENT_SECRET. |