Misskey is a decentralized platform.

Misskey is just a platform for server owners to make their own instances of Misskey, and they can all talk to each other! There's large instances for the masses, smaller ones for groups, fandoms, and subcultures, and even instances just for individuals and their friends. Want to have even more control? You can make your own instance on your server with relative ease, cutting ties from any large company who wants to spy on you and sell your data. Misskey is about community and sharing, not corporations and big tech. Have friends not on Misskey? No problem! Because Misskey is on the Fediverse (ActivityPub), you can interact with people on other platforms like Mastodon, PixelFed, PeerTube, and more!


pip install fastapi-misskey


from typing import Optional

from fastapi import Depends, FastAPI

from fastapi_misskey.client import MisskeyAuthClient

app = FastAPI()
misskey = MisskeyAuthClient(
    description='FastAPI Misskey Auth'

async def login():
    return {'url': await misskey.get_auth_url()}

async def callback(session: Optional[str] = None, token: Optional[str] = None):
    token, user = await misskey.get_access_token(session, token)
    return {'token': token, 'user': user}

async def profile(user=Depends(misskey.get_user)):
    if user.get('error'):
        return user
        return {'user': user}

keywords: FastAPI