Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- facet: XXXX-XXXX-XXXX-XXXX
- we have our JSON File:
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- {
- "$type": "app.bsky.feed.post",
- "text": "This is my general Post: link",
- "createdAt": "2025-10-24T15:00:00.000Z",
- "facets": [
- {
- "$type": "app.bsky.richtext.facet",
- "index": { "byteStart": 25, "byteEnd": 29 },
- "features": [
- {
- "$type": "app.bsky.richtext.facet#link",
- "uri": "http://google.com"
- }
- ]
- }
- ]
- }
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- our curl cmdline:
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- curl -s -X POST https://bsky.social/xrpc/com.atproto.server.createSession \
- -H "Content-Type: application/json" \
- -d '{"identifier":"XXXXXXX.bsky.social","password":"XXXX-XXXX-XXXX-XXXX"}' > access.jwt
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- we need the response token as: $ACCESS_JWT
- so make extract the token:
- cat access.jwt | jq -r '.accessJwt' > access.token
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- and respond to it:
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- curl -s -X POST https://bsky.social/xrpc/com.atproto.repo.createRecord \
- -H "Authorization: Bearer $(cat access.token)" \
- -H "Content-Type: application/json" \
- -d "{
- \"repo\": \"fspkwon.bsky.social\",
- \"collection\": \"app.bsky.feed.post\",
- \"record\": {
- \"\$type\": \"app.bsky.feed.post\",
- \"text\": \"This is my general Post: link\",
- \"createdAt\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",
- \"facets\": [
- {
- \"\$type\": \"app.bsky.richtext.facet\",
- \"index\": { \"byteStart\": 25, \"byteEnd\": 29 },
- \"features\": [
- { \"\$type\": \"app.bsky.richtext.facet#link\", \"uri\": \"http://google.com\" }
- ]
- }
- ]
- }
- }"
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Add Comment
Please, Sign In to add comment