# stensul-get-auth-url

> Starts the OAuth authorization-code flow and returns the sign-in URL the user opens in a browser.

Source: https://stensul.com/developers/reference/stensul-get-auth-url/ · From the live server's tool list, 2026-09-28

- Scope: none
- Access: write

Hosts that support remote OAuth connectors (Claude, ChatGPT, Writer, Copilot Studio) run this flow themselves. The server tells the model to show the full URL to the user, never a summary of it.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `callback_url` | string | no | OAuth redirect URI override. Leave unset: the server builds the callback from its own base URL and your instance at runtime. Only for one-off local testing. |

## Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "stensul-get-auth-url",
    "arguments": {}
  }
}
```

## Response

An authorization URL for your Stensul instance. After the user signs in and approves, the token is saved for the session.

## Errors

| Status | Message | Cause | Fix |
| --- | --- | --- | --- |
| sign-in | Redirect URI mismatch | The redirect URI on the API connection is missing your instance name or doesn't match exactly. | Set it to exactly `https://mcp.stensul.com/<your-instance>/oauth/callback` (Writer also needs its own callback). |
