# Open a sign-in in this tab

**POST** `/api/connections/oauth2/attempts/{attemptId}/go`

For GoRunner’s own pages: opens a tab sign-in in the same tab when a popup is blocked.

Needs [an API token](https://docs.gorunner.io/api/authentication#scopes) with the **Write** permission for connections (`connection:write`).

## Parameters

### Path

- `attemptId` · Required · string: A sign-in started with `mode: tab`.

## Not for API tokens

Only the person who started the sign-in can open it, once, in the browser that started it. From code, use [Start a sign-in for a new connection](https://docs.gorunner.io/api/connections/start-connection-oauth2-draft) with a `returnUrl`.

## Responses

- 200 OK

  Where to send the tab. It also sets the cookie the return needs.

- 403 `FORBIDDEN`

  The token lacks the **Write** permission for connections.

- 403 `ACCOUNT_SUSPENDED`

  The workspace’s account is suspended. Nothing starts until it is resumed.

- 404 `NOT_FOUND`

  Not a sign-in you started.

- 409 `SIGNIN_NOT_PENDING`

  The sign-in was already opened or has ended, or isn’t a tab sign-in. Start it again.

- 409 `ACCOUNT_DELETED`

  The workspace’s account was deleted.

- 500 `INTERNAL_ERROR`

  The sign-in couldn’t be opened.

- 503 `UNAVAILABLE`

  This server can’t reach sign-ins now.

- 503 `STATE_UNAVAILABLE`

  The account’s state couldn’t be read. Nothing started. Try again.

Any call can also answer: [`401 UNAUTHORIZED`](https://docs.gorunner.io/errors#UNAUTHORIZED) · [`401 TOKEN_ENDED`](https://docs.gorunner.io/errors#TOKEN_ENDED) · [`403 TOKEN_SURFACE_OFF`](https://docs.gorunner.io/errors#TOKEN_SURFACE_OFF) · [`403 FEATURE_OFF`](https://docs.gorunner.io/errors#FEATURE_OFF) · [`403 EMBED_NOT_ALLOWED`](https://docs.gorunner.io/errors#EMBED_NOT_ALLOWED) · [`403 EMBED_NOT_AVAILABLE`](https://docs.gorunner.io/errors#EMBED_NOT_AVAILABLE) · [`413 PAYLOAD_TOO_LARGE`](https://docs.gorunner.io/errors#PAYLOAD_TOO_LARGE) · [`415 INVALID_CONTENT_TYPE`](https://docs.gorunner.io/errors#INVALID_CONTENT_TYPE) · [`429 RATE_LIMITED`](https://docs.gorunner.io/errors#RATE_LIMITED) · [`503 BUSY`](https://docs.gorunner.io/errors#BUSY) · [`503 PAUSED`](https://docs.gorunner.io/errors#PAUSED) · [`503 SERVICE_UNAVAILABLE`](https://docs.gorunner.io/errors#SERVICE_UNAVAILABLE). See [Errors](https://docs.gorunner.io/api/errors#by-status).

Request

**curl**

```bash
GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…"  # needs Write for connections
ATTEMPT_ID="your-attempt-id"  # from the start

URL="$GORUNNER/api/connections/oauth2/attempts/"
URL="${URL}$ATTEMPT_ID/go"
curl -X POST "$URL" \
  -H "Authorization: Bearer $GORUNNER_TOKEN"
```

**JavaScript**

```js
const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const ATTEMPT_ID = process.env.ATTEMPT_ID; // from the start

const res = await fetch(
  `${GORUNNER}/api/connections/oauth2/attempts/` +
    `${ATTEMPT_ID}/go`,
  {
    method: "POST",
    headers: { Authorization: `Bearer ${TOKEN}` },
  },
);
const { data } = await res.json();
```

**Python**

```python
import os, requests

GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
ATTEMPT_ID = os.environ["ATTEMPT_ID"]  # from the start

res = requests.post(
    f"{GORUNNER}/api/connections/oauth2/attempts/"
    f"{ATTEMPT_ID}/go",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
data = res.json()["data"]
```

Response · 200 OK

```json
{
  "data": {
    "redirectUrl": "https://accounts.google.com/o/oauth2/v2/auth?…"
  }
}
```

**Every field**

It takes no body.

### Response · 200 OK

- `data` · object
  - `redirectUrl` · URL

Related: [Start a sign-in for a new connection](https://docs.gorunner.io/api/connections/start-connection-oauth2-draft)

Source: https://docs.gorunner.io/api/connections/launch-connection-oauth2-here
