---
title: "Connect Bluesky with an app password (integrations.blueskySession)"
description: "PubNio API integrations.blueskySession: connect Bluesky with an app password. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Bluesky with an app password (integrations.blueskySession)

Connect Bluesky with an app password with [`POST /api/v1/integrations/bluesky/session`](https://pubnio.com/api/v1/docs#tag/integrations/POST/api/v1/integrations/bluesky/session). Requires a signed-in workspace owner, in the web app or the CLI; API keys are not accepted and MCP cannot call it.

## Request

Exchanges a handle and app password for an encrypted AT Protocol session, connects the account, and returns a workspace URL. Pass accountId to reconnect that existing Bluesky account; a different DID is rejected.

| Parameter     | In    | Type | Required |
| ------------- | ----- | ---- | -------- |
| `workspaceId` | query | UUID | Yes      |

| Body field    | Type   | Required |
| ------------- | ------ | -------- |
| `handle`      | string | Yes      |
| `appPassword` | string | Yes      |
| `service`     | string | No       |
| `accountId`   | UUID   | No       |
| `profileId`   | UUID   | No       |

## Response

- HTTP 200: an object with `attemptId`, `url`, `expiresAt`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

The TypeScript SDK has no method for this operation yet; send it over HTTP as the cURL tab shows.

### Python

The Python SDK authenticates with a workspace API key, which this operation does not accept, so it has no method for it.

### cURL

```sh
curl -X POST "https://pubnio.com/api/v1/integrations/bluesky/session?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"handle":"studio.bsky.social","appPassword":"abcd-efgh-ijkl-mnop"}'
```

### CLI

```sh
pnio integrations bluesky-session --handle studio.bsky.social --app-password "$BLUESKY_APP_PASSWORD"
```

### MCP execute

```js
async () => {
  const response = await codemode.request({
    method: "POST",
    path: "/api/v1/integrations/bluesky/session",
    query: { workspaceId: codemode.workspaceId },
    body: {
      handle: "studio.bsky.social",
      appPassword: "abcd-efgh-ijkl-mnop",
    },
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

No key, so a retried `POST` is not deduplicated. Read the current state before you retry.

## Limits

- API keys and MCP cannot call it. A signed-in person runs it from the CLI after `pnio auth login` or in the web app.

## Related

- [Connected accounts operations](https://pubnio.com/docs/reference/#connected-accounts)
- [Accounts and connections](https://pubnio.com/docs/accounts/)

Source: https://pubnio.com/docs/reference/integrations-bluesky-session/index.mdx
