Bluesky is an open network. With one account, you can access both an easy-to-use social network and a shared identity across the entire social internet.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
bluesky: {
type: "app",
app: "bluesky",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://bsky.social/xrpc/app.bsky.actor.getProfile?actor=${this.bluesky.$auth.did}`,
headers: {
Authorization: `Bearer ${this.bluesky.$auth.oauth_access_token}`,
},
})
},
})
Bluesky uses OAuth authentication. When you connect your Bluesky account, Pipedream will open a popup window where you can sign into Bluesky and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Bluesky API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://bsky.social/xrpc/com.atproto.server.createSession
content-type: application/x-www-form-urlencoded
accept: application/json
identifier={{custom_fields.handle}}
&
password={{custom_fields.app_password}}
POST
https://bsky.social/xrpc/com.atproto.server.refreshSession
content-type: application/x-www-form-urlencoded
accept: application/json