Nima
unknown
javascript
3 years ago
413 B
11
Indexable
const json = localStorage.getItem("root");
const obj = JSON.parse(json);
token = obj.session.accounts[0].accessJwt;
fetch('https://bsky.social/xrpc/com.atproto.identity.updateHandle', {
method: 'POST',
body: JSON.stringify({"handle":"1mazafard.bsky.social"}),
headers: {
'Content-type': 'application/json; charset=UTF-8',
'authorization': 'Bearer '+token,
}}).then(res=>{console.log(res.status);})Editor is loading...