Bluesky API Authentication
How to authenticate Bluesky API requests: one Bearer API key plus a connectionId. MindCloud handles Bluesky's custom auth scheme for you.
Every Bluesky API request through MindCloud needs two things: a MindCloud API Key and a connectionId for your Bluesky account. This page covers both, plus exactly how to send them, so you do not need to visit any other page to get authenticated.
Steps to authenticate
- Create a MindCloud account at app.mindcloud.co if you do not already have one.
- Generate a MindCloud API Key in API Keys. This is the Bearer token you send on every request. Keep it on your server.
- Create a Bluesky connection in Connections. Bluesky uses its own authentication scheme. You provide whatever it requires when you create the connection — MindCloud handles the provider-specific details for you.
- Copy the connection’s
connectionId— you will send it on every request alongside your MindCloud API Key.
How requests are authenticated
Authentication has two layers. Your MindCloud API Key authenticates the request to MindCloud, sent as a Bearer token in the Authorization header. The connectionId selects the connected Bluesky account that should run the action. MindCloud stores and refreshes the Bluesky credentials behind that connection, so you never send provider tokens with your requests.
Pass connectionId in the query string for GET and DELETE actions, and in the JSON body for POST, PUT, and PATCH actions.
For example, calling Get Session with an Bluesky connection looks like this:
curl --request POST \
--url "https://connect.mindcloud.co/v2/universal/apps/bluesky/actions/get-session/run" \
--header "Authorization: Bearer $MINDCLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"connectionId": "$CONNECTION_ID",
"arguments": {}
}'The Authorization: Bearer <your MindCloud API Key> header authenticates you to MindCloud; the connectionId tells MindCloud which Bluesky account to run the action against. Missing or invalid Authorization returns 401, and a missing or mismatched connectionId returns 400.
Create a Bluesky app-password session
You need a Bluesky account handle and an app password created for the account you want MindCloud to use.
- Create or confirm a Bluesky app password
Use an app password from the Bluesky account you want this connection to act as. If you need a new one, create it in the official Bluesky account settings before continuing.
- Create a session with the official createSession endpoint
Send a POST request to Bluesky's createSession endpoint with JSON body fields identifier and password. Use your account handle as identifier and your app password as password.
HTTP Reference → com.atproto.server.createSession - Copy the access token
Paste response.accessJwt into the Access Token field.
- Copy the refresh token
Paste response.refreshJwt into the Refresh Token field.
- Copy the DID
Paste response.did into the DID field.
- Copy the PDS URL
From response.didDoc.service, find the entry whose type is AtprotoPersonalDataServer and paste its serviceEndpoint into the PDS URL field.
- Save the connection and run the session test
After all four fields are filled, save the connection. MindCloud will use the saved access token against the saved PDS URL for authenticated Bluesky API calls.
Keep your key safe
Keep your MindCloud API Key on your server; do not ship it in browser code, mobile apps, public repositories, or logs. Anyone with the key can call the Universal API as your MindCloud account, across every connection you have created.