{ "openapi": "3.0.4", "info": { "title": "Internal API", "description": "This is the internal API used by the MinecraftAuthentication websites. This is not easily accessible, nor intended to be accessible, for public use, and therefore may be changed at any time without warning. This documentation may also not always be up to date.", "termsOfService": "https://github.com/MinecraftAuthentication/legal/blob/main/TERMS.md", "contact": { "name": "MinecraftAuthentication", "url": "https://gooble.com" }, "version": "Unversioned" }, "externalDocs": { "description": "MinecraftAuthentication - Documentation", "url": "https://docs.minecraftauth.me" }, "servers": [ { "url": "https://api.minecraftauth.me" } ], "tags": [ { "name": "Application", "description": "Information regarding applications created by developers", "externalDocs": { "description": "Find out more", "url": "https://swagger.io" } }, { "name": "Authentication", "description": "Manage authentication with MinecraftAuth.me's website", "externalDocs": { "description": "Find out more", "url": "https://swagger.io" } } ], "paths": { "/applications": { "get": { "tags": [ "Application" ], "summary": "Retrieve your applications", "description": "Requires being logged into the MinecraftAuthentication website, and passing the JSESSIONID cookie along with your request.", "operationId": "myApplications", "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Applications" } } } }, "401": { "description": "Unauthorized. No UUID in internal session" } }, "security": [ { "JSESSIONID": [] } ] }, "post": { "tags": [ "Application" ], "summary": "Create an application", "description": "Requires being logged into the MinecraftAuthentication website, and passing the JSESSIONID cookie along with your request.", "operationId": "cApplication", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAppRequest" } } } }, "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Application" } } } }, "401": { "description": "Unauthorized. No UUID in internal session" } }, "security": [ { "JSESSIONID": [] } ] } }, "/applications/{appId}": { "get": { "tags": [ "Application" ], "summary": "Retrieve a specific application", "operationId": "aApplication", "parameters": [ { "in": "path", "name": "appId", "schema": { "type": "string" }, "example": 1386569599520080000, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Application" } } } }, "404": { "description": "Application not found" } } }, "patch": { "tags": [ "Application" ], "summary": "Update values in an application", "operationId": "pApplication", "parameters": [ { "in": "path", "name": "appId", "schema": { "type": "string" }, "example": 1386569599520080000, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Application" } } } }, "400": { "description": "Cannot update name or logo of a verified application. Contact our support team. OR At least 1 redirect URL must be provided" }, "401": { "description": "Unauthorized. No UUID in internal session" }, "403": { "description": "You do not own this application" }, "404": { "description": "Application not found" } }, "security": [ { "JSESSIONID": [] } ] }, "delete": { "tags": [ "Application" ], "summary": "Delete an application", "operationId": "dApplication", "parameters": [ { "in": "path", "name": "appId", "schema": { "type": "string" }, "example": 1386569599520080000, "required": true } ], "responses": { "200": { "description": "Successful operation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Application" } } } }, "401": { "description": "Unauthorized. No UUID in internal session" }, "403": { "description": "You do not own this application" }, "404": { "description": "Application not found" } }, "security": [ { "JSESSIONID": [] } ] } }, "/applications/{appId}/secret": { "post": { "tags": [ "Application" ], "summary": "Rotate the secret on an application", "description": "The response of this request is a bit misleading. We don't ever get your application secret, that is 100% generated by you. new_secret is just the public key returned back to you as a confirmation we got it.", "operationId": "sApplication", "parameters": [ { "in": "path", "name": "appId", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "appPublicKey", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Updated secret", "content": { "application/json": { "schema": { "type": "object", "properties": { "new_secret": { "type": "string" } } } } } }, "400": { "description": "Missing appPublicKey query parameter" }, "401": { "description": "Unauthorized. No UUID in internal session" }, "403": { "description": "You do not own this application" }, "404": { "description": "Application not found" } }, "security": [ { "JSESSIONID": [] } ] } }, "/applications/{appId}/verify": { "post": { "tags": [ "Application" ], "summary": "Request verification on an application", "operationId": "vApplication", "parameters": [ { "in": "path", "name": "appId", "schema": { "type": "string" }, "required": true } ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "new_secret": { "type": "string" } } } } } }, "400": { "description": "Missing one/some/all of tos_url, privacy_url, or redirect_urls is blank within your application settings OR Application is not UNVERIFIED or REJECTED" }, "401": { "description": "Unauthorized. No UUID in internal session" }, "403": { "description": "You do not own this application" }, "404": { "description": "Application not found" } }, "security": [ { "JSESSIONID": [] } ] } }, "/auth/verify": { "get": { "tags": [ "Authentication" ], "operationId": "verifyCode", "summary": "Verify a code through the Minecraft Server", "parameters": [ { "in": "query", "name": "code", "schema": { "type": "string" }, "required": true } ], "responses": { "202": { "description": "Accepted" }, "400": { "description": "Invalid or expired code" } } } }, "/auth/logout": { "get": { "tags": [ "Authentication" ], "operationId": "logout", "summary": "Logout & Invalidate your session", "responses": { "204": { "description": "OK" } }, "security": [ { "JSESSIONID": [] } ] } }, "/auth/should-i-be-logged-in": { "get": { "tags": [ "Authentication" ], "operationId": "shouldBeLoggedIn", "summary": "Check if the user should be logged in", "responses": { "204": { "description": "Logged in" }, "401": { "description": "Not logged in" } }, "security": [ { "JSESSIONID": [] } ] } }, "/auth/identity": { "get": { "tags": [ "Authentication" ], "operationId": "identity", "summary": "Get user identities", "responses": { "204": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "platformName": { "type": "string" } } } } } }, "401": { "description": "Not logged in" } }, "security": [ { "JSESSIONID": [] } ] } }, "/auth/providers": { "get": { "tags": [ "Authentication" ], "operationId": "getProviders", "summary": "List all available providers", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Providers" } } } } } } }, "/auth/accept": { "post": { "tags": [ "Authentication" ], "operationId": "grant", "summary": "Create a JWT with accepted platform ids", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "accepted": { "type": "array", "items": { "type": "string", "example": "platform_name" } }, "appId": { "type": "string" }, "redirectUrl": { "type": "string" } } } } } }, "responses": { "200": { "description": "OK" }, "400": { "description": "Invalid request body" } }, "security": [ { "JSESSIONID": [] } ] } }, "/connect/{platform}": { "get": { "tags": [ "Platforms" ], "parameters": [ { "in": "path", "name": "platform", "schema": { "type": "string" }, "required": true } ], "responses": { "302": { "description": "Found and redirected" } } } }, "/disconnect/{platform}": { "get": { "tags": [ "Platforms" ], "parameters": [ { "in": "path", "name": "platform", "schema": { "type": "string" }, "required": true } ], "responses": { "204": { "description": "Disconnected" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not linked" } }, "security": [ { "JSESSIONID": [] } ] } }, "/.well-known/rsa.pub": { "get": { "tags": [ "WellKnown" ], "summary": "Get the raw RSA public key", "responses": { "200": { "description": "OK" } } } }, "/.well-known/jwks.json": { "get": { "tags": [ "WellKnown" ], "summary": "Get the JWKS data", "responses": { "200": { "description": "OK" } } } }, "/.well-known/openid-configuration": { "get": { "tags": [ "WellKnown" ], "summary": "Get the OpenID Config", "responses": { "200": { "description": "OK" } } } }, "/.well-known/{appId}/jwks.json": { "get": { "tags": [ "WellKnown" ], "summary": "Get the JWKS data for a specific application", "parameters": [ { "in": "path", "name": "appId", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "securitySchemes": { "JSESSIONID": { "type": "apiKey", "in": "cookie", "name": "JSESSIONID" } }, "schemas": { "Application": { "type": "object", "properties": { "name": { "type": "string" }, "logo": { "type": "string" }, "redirect_urls": { "type": "array", "items": { "type": "string" } }, "tos_url": { "type": "string" }, "privacy_url": { "type": "string" }, "verify_status": { "type": "string", "example": "UNVERIFIED" } } }, "CreateAppRequest": { "type": "object", "properties": { "name": { "type": "string" }, "redirect_urls": { "type": "array", "items": { "type": "string" } }, "logo": { "type": "string" }, "tos_url": { "type": "string" }, "privacy_url": { "type": "string" }, "public_key": { "type": "string" } } }, "Provider": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "icon": { "type": "string" }, "iconType": { "type": "string" }, "accentColor": { "type": "string" }, "grants": { "type": "array", "items": { "type": "string" } } } }, "JWK": { "type": "object", "properties": { "kty": { "type": "string" }, "use": { "type": "string" }, "kid": { "type": "string" }, "alg": { "type": "string" }, "n": { "type": "string" }, "e": { "type": "string" } } }, "JWKs": { "type": "object", "properties": { "keys": { "type": "array", "items": { "$ref": "#/components/schemas/JWK" } } } }, "Applications": { "type": "array", "items": { "$ref": "#/components/schemas/Application" } }, "Providers": { "type": "array", "items": { "$ref": "#/components/schemas/Provider" } } } } }