+15
-3
script.ts
+15
-3
script.ts
···
1
+
import { AtpAgent } from "@atproto/api";
2
import dotenv from "dotenv";
3
4
dotenv.config();
···
51
const agent = new AtpAgent({ service: PDS_URL });
52
53
await agent.login({ identifier: IDENTIFIER, password: PASSWORD });
54
+
55
+
const handle = agent.session?.handle;
56
+
57
+
if (handle) {
58
+
const profile = await agent.app.bsky.actor.getProfile({
59
+
actor: handle
60
+
});
61
+
62
+
if (profile) {
63
+
const bio = profile.data.description;
64
+
65
+
console.log(bio);
66
+
}
67
+
}
68
};
69
70
main();