|
|
|
@ -101,23 +101,32 @@ curl -X POST -H "Content-Type: application/json" -d "$json" $url
|
|
|
|
|
Ok
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### session
|
|
|
|
|
|
|
|
|
|
### invite code
|
|
|
|
|
```sh
|
|
|
|
|
# com.atproto.session.create
|
|
|
|
|
$ host=bsky.social
|
|
|
|
|
$ user=syui
|
|
|
|
|
$ pass=xxx
|
|
|
|
|
$ curl -X POST -H "Content-Type: application/json" -d "{\"handle\":\"$user.$host\",\"password\":\"$pass\"}" https://$host/xrpc/com.atproto.session.create
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> packages/pds/src/api/com/atproto/account/createInviteCode.ts
|
|
|
|
|
### profile
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$ url=https://$host/xrpc/com.atproto.account.createInviteCode
|
|
|
|
|
$ url="https://$host/xrpc/app.bsky.actor.getProfile?actor=syui.syui.ai"
|
|
|
|
|
$ token=`cat token.json| jq -r .accessJwt`
|
|
|
|
|
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $token" $url
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### invite code
|
|
|
|
|
|
|
|
|
|
### session
|
|
|
|
|
> packages/pds/src/api/com/atproto/account/createInviteCode.ts
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
# com.atproto.session.create
|
|
|
|
|
$ host=bsky.social
|
|
|
|
|
$ user=syui
|
|
|
|
|
$ pass=xxx
|
|
|
|
|
$ curl -X POST -H "Content-Type: application/json" -d "{\"handle\":\"$user.$host\",\"password\":\"$pass\"}" https://$host/xrpc/com.atproto.session.create
|
|
|
|
|
$ url=https://$host/xrpc/com.atproto.account.createInviteCode
|
|
|
|
|
$ token=`cat token.json| jq -r .accessJwt`
|
|
|
|
|
$ json="{\"useCount\":5}"
|
|
|
|
|
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $token" -d "$json" $url
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|