Misskey auth API

The auth API from Misskey — 5 operation(s) for auth.

OpenAPI Specification

misskey-auth-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 2025.4.1-io.12b-fb6fbea074
  title: Misskey account auth API
servers:
- url: https://misskey.io/api
tags:
- name: auth
paths:
  /auth/accept:
    post:
      operationId: post___auth___accept
      summary: auth/accept
      description: 'No description provided.


        **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.

        **Credential required**: *Yes*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/auth/accept.ts
      tags:
      - auth
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
              required:
              - token
      responses:
        '204':
          description: OK (without any results)
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NO_SUCH_SESSION:
                  value:
                    error:
                      message: No such session.
                      code: NO_SUCH_SESSION
                      id: 9c72d8de-391a-43c1-9d06-08d29efde8df
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /auth/session/generate:
    post:
      operationId: post___auth___session___generate
      summary: auth/session/generate
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/auth/session/generate.ts
      tags:
      - auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                appSecret:
                  type: string
              required:
              - appSecret
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                  url:
                    type: string
                    format: url
                required:
                - token
                - url
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NO_SUCH_APP:
                  value:
                    error:
                      message: No such app.
                      code: NO_SUCH_APP
                      id: 92f93e63-428e-4f2f-a5a4-39e1407fe998
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /auth/session/show:
    post:
      operationId: post___auth___session___show
      summary: auth/session/show
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/auth/session/show.ts
      tags:
      - auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
              required:
              - token
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: id
                  app:
                    type: object
                    $ref: '#/components/schemas/App'
                  token:
                    type: string
                required:
                - id
                - app
                - token
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NO_SUCH_SESSION:
                  value:
                    error:
                      message: No such session.
                      code: NO_SUCH_SESSION
                      id: bd72c97d-eba7-4adb-a467-f171b8847250
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /auth/session/userkey:
    post:
      operationId: post___auth___session___userkey
      summary: auth/session/userkey
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/auth/session/userkey.ts
      tags:
      - auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                appSecret:
                  type: string
                token:
                  type: string
              required:
              - appSecret
              - token
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                  user:
                    type: object
                    $ref: '#/components/schemas/UserDetailed'
                required:
                - accessToken
                - user
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                NO_SUCH_APP:
                  value:
                    error:
                      message: No such app.
                      code: NO_SUCH_APP
                      id: fcab192a-2c5a-43b7-8ad8-9b7054d8d40d
                NO_SUCH_SESSION:
                  value:
                    error:
                      message: No such session.
                      code: NO_SUCH_SESSION
                      id: 5b5a1503-8bc8-4bd0-8054-dc189e8cdcb3
                PENDING_SESSION:
                  value:
                    error:
                      message: This session is not completed yet.
                      code: PENDING_SESSION
                      id: 8c8a4145-02cc-4cca-8e66-29ba60445a8e
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /miauth/gen-token:
    post:
      operationId: post___miauth___gen-token
      summary: miauth/gen-token
      description: 'No description provided.


        **Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.

        **Credential required**: *Yes*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/miauth/gen-token.ts
      tags:
      - auth
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                session:
                  type:
                  - string
                  - 'null'
                name:
                  type:
                  - string
                  - 'null'
                description:
                  type:
                  - string
                  - 'null'
                iconUrl:
                  type:
                  - string
                  - 'null'
                permission:
                  type: array
                  uniqueItems: true
                  items:
                    type: string
              required:
              - session
              - permission
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                required:
                - token
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
components:
  schemas:
    UserDetailedNotMeOnly:
      type: object
      properties:
        url:
          type:
          - string
          - 'null'
          format: url
        uri:
          type:
          - string
          - 'null'
          format: uri
        movedTo:
          type:
          - string
          - 'null'
          format: uri
        alsoKnownAs:
          type:
          - array
          - 'null'
          items:
            type: string
            format: id
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type:
          - string
          - 'null'
          format: date-time
        lastFetchedAt:
          type:
          - string
          - 'null'
          format: date-time
        bannerUrl:
          type:
          - string
          - 'null'
          format: url
        bannerBlurhash:
          type:
          - string
          - 'null'
        isLocked:
          type: boolean
        isSilenced:
          type: boolean
        isLimited:
          type: boolean
        isSuspended:
          type: boolean
          example: false
        description:
          type:
          - string
          - 'null'
          example: Hi masters, I am Ai!
        location:
          type:
          - string
          - 'null'
        birthday:
          type:
          - string
          - 'null'
          example: '2018-03-12'
        lang:
          type:
          - string
          - 'null'
          example: ja-JP
        fields:
          type: array
          maxItems: 16
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
            required:
            - name
            - value
        verifiedLinks:
          type: array
          items:
            type: string
            format: url
        followersCount:
          type: number
        followingCount:
          type: number
        notesCount:
          type: number
        pinnedNoteIds:
          type: array
          items:
            type: string
            format: id
        pinnedNotes:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/Note'
        pinnedPageId:
          type:
          - string
          - 'null'
        pinnedPage:
          type:
          - object
          - 'null'
          anyOf:
          - $ref: '#/components/schemas/Page'
          - type: 'null'
        publicReactions:
          type: boolean
        followingVisibility:
          type: string
          enum:
          - public
          - followers
          - private
        followersVisibility:
          type: string
          enum:
          - public
          - followers
          - private
        chatScope:
          type: string
          enum:
          - everyone
          - following
          - followers
          - mutual
          - none
        canChat:
          type: boolean
        roles:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/RoleLite'
        followedMessage:
          type:
          - string
          - 'null'
        memo:
          type:
          - string
          - 'null'
        moderationNote:
          type: string
        twoFactorEnabled:
          type: boolean
        usePasswordLessLogin:
          type: boolean
        securityKeys:
          type: boolean
        mutualLinkSections:
          type: array
          items:
            type: object
            properties:
              name:
                type:
                - string
                - 'null'
              mutualLinks:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: misskey:id
                    url:
                      type: string
                      format: url
                    fileId:
                      type: string
                      format: misskey:id
                    description:
                      type:
                      - string
                      - 'null'
                    imgSrc:
                      type: string
                  required:
                  - id
                  - url
                  - fileId
                  - description
                  - imgSrc
            required:
            - name
            - mutualLinks
        isFollowing:
          type: boolean
        isFollowed:
          type: boolean
        hasPendingFollowRequestFromYou:
          type: boolean
        hasPendingFollowRequestToYou:
          type: boolean
        isBlocking:
          type: boolean
        isBlocked:
          type: boolean
        isMuted:
          type: boolean
        isRenoteMuted:
          type: boolean
        notify:
          type: string
          enum:
          - normal
          - none
        withReplies:
          type: boolean
      required:
      - url
      - uri
      - movedTo
      - alsoKnownAs
      - createdAt
      - updatedAt
      - lastFetchedAt
      - bannerUrl
      - bannerBlurhash
      - isLocked
      - isSilenced
      - isLimited
      - isSuspended
      - description
      - location
      - birthday
      - lang
      - fields
      - verifiedLinks
      - followersCount
      - followingCount
      - notesCount
      - pinnedNoteIds
      - pinnedNotes
      - pinnedPageId
      - pinnedPage
      - publicReactions
      - followingVisibility
      - followersVisibility
      - chatScope
      - canChat
      - roles
      - memo
      - mutualLinkSections
    UserDetailedNotMe:
      type: object
      allOf:
      - type: object
        $ref: '#/components/schemas/UserLite'
      - type: object
        $ref: '#/components/schemas/UserDetailedNotMeOnly'
    MeDetailedOnly:
      type: object
      properties:
        avatarId:
          type:
          - string
          - 'null'
          format: id
        bannerId:
          type:
          - string
          - 'null'
          format: id
        followedMessage:
          type:
          - string
          - 'null'
        isModerator:
          type:
          - boolean
          - 'null'
        isAdmin:
          type:
          - boolean
          - 'null'
        injectFeaturedNote:
          type: boolean
        receiveAnnouncementEmail:
          type: boolean
        alwaysMarkNsfw:
          type: boolean
        autoSensitive:
          type: boolean
        carefulBot:
          type: boolean
        autoAcceptFollowed:
          type: boolean
        noCrawle:
          type: boolean
        preventAiLearning:
          type: boolean
        isExplorable:
          type: boolean
        isDeleted:
          type: boolean
        twoFactorBackupCodesStock:
          type: string
          enum:
          - full
          - partial
          - none
        hideOnlineStatus:
          type: boolean
        hasUnreadSpecifiedNotes:
          type: boolean
        hasUnreadMentions:
          type: boolean
        hasUnreadAnnouncement:
          type: boolean
        unreadAnnouncements:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/Announcement'
        hasUnreadAntenna:
          type: boolean
        hasUnreadChannel:
          type: boolean
        hasUnreadChatMessages:
          type: boolean
        hasUnreadNotification:
          type: boolean
        hasPendingReceivedFollowRequest:
          type: boolean
        unreadNotificationsCount:
          type: number
        mutedWords:
          type: array
          items:
            type: array
            items:
              type: string
        mutedInstances:
          type:
          - array
          - 'null'
          items:
            type: string
        postingLang:
          type:
          - string
          - 'null'
          example: ja-JP
        viewingLangs:
          type: array
          items:
            type: string
        showMediaInAllLanguages:
          type: boolean
        showHashtagsInAllLanguages:
          type: boolean
        notificationRecieveConfig:
          type: object
          properties:
            note:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - all
                    - following
                    - follower
                    - mutualFollow
                    - followingOrFollower
                    - never
                required:
                - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - list
                  userListId:
                    type: string
                    format: misskey:id
                required:
                - type
                - userListId
            follow:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - all
                    - following
                    - follower
                    - mutualFollow
                    - followingOrFollower
                    - never
                required:
                - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - list
                  userListId:
                    type: string
                    format: misskey:id
                required:
                - type
                - userListId
            mention:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - all
                    - following
                    - follower
                    - mutualFollow
                    - followingOrFollower
                    - never
                required:
                - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - list
                  userListId:
                    type: string
                    format: misskey:id
                required:
                - type
                - userListId
            reply:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - all
                    - following
                    - follower
                    - mutualFollow
                    - followingOrFollower
                    - never
                required:
                - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - list
                  userListId:
                    type: string
                    format: misskey:id
                required:
                - type
                - userListId
            renote:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - all
                    - following
                    - follower
                    - mutualFollow
                    - followingOrFollower
                    - never
                required:
                - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - list
                  userListId:
                    type: string
                    format: misskey:id
                required:
                - type
                - userListId
            quote:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - all
                    - following
                    - follower
                    - mutualFollow
                    - followingOrFollower
                    - never
                required:
                - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                    - list
                  userListId:
                    type: string
                    format: misskey:id
                required:
                - type
                - userListId
            reaction:
              type: object
              oneOf:
              - type: object
                properties:
                  type:
                    type: string
             

# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/misskey/refs/heads/main/openapi/misskey-auth-api-openapi.yml