Last active
May 27, 2024 15:37
-
-
Save boly38/1766ce67bb75d78c431fc51cbe016573 to your computer and use it in GitHub Desktop.
bluesky my first automated post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from : https://github.com/boly38/botEnSky/issues/1 | |
import {BskyAgent} from '@atproto/api' | |
const identifier = process.env.BLUESKY_EMAIL; | |
const password = process.env.BLUESKY_PASSWORD; | |
const service = "https://api.bsky.social"; | |
const agent = new BskyAgent({service}) | |
await agent.login({identifier, password}); | |
const text = "Hey ! Ceci est un Post de PoC (fichier js de 8 lignes) & sera le seul test sur ce compte #bluesky #api #bot https://docs.bsky.app/docs/get-started"; | |
await agent.post({text, createdAt: new Date().toISOString()}).then(console.log).catch(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment