{"openapi":"3.1.0","info":{"title":"EGP IDSOC Proxy","version":"1.0.0"},"paths":{"/account/api/oauth/exchange":{"get":{"tags":["Account - OAuth"],"summary":"Get an exchange code","operationId":"getExchangeCode","responses":{"200":{"description":"An exchange code","content":{"application/json":{"schema":{"type":"object","required":["expiresInSeconds","code","creatingClientId"],"properties":{"expiresInSeconds":{"type":"integer","examples":[300,299]},"code":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$"},"creatingClientId":{"$ref":"#/components/schemas/ClientID"},"consumingClientId":{"$ref":"#/components/schemas/ClientID"}}}}}}},"description":"**Permission Required**: [`account:oauth:exchangeTokenCode CREATE`](https://egs.jaren.wtf/#resource=account:oauth:exchangeTokenCode&action=1)","security":[{"bearer":["account:oauth:exchangeTokenCode CREATE"]}]}},"/account/api/oauth/sessions/kill":{"delete":{"tags":["Account - OAuth"],"summary":"Kill sessions","parameters":[{"in":"query","name":"killType","schema":{"type":"string","enum":["OTHERS_ACCOUNT_CLIENT_SERVICE","OTHERS_ACCOUNT_CLIENT","OTHERS_SAME_SOURCE_ID","OTHERS","ALL","ALL_ACCOUNT_CLIENT"]},"required":true,"description":"Kill type"}],"responses":{"204":{"description":"The sessions were killed"}},"description":"**Permission Required**: [`egp:account:token:otherSessionsForAccountClientService DELETE`](https://egs.jaren.wtf/#resource=egp:account:token:otherSessionsForAccountClientService&action=8)","security":[{"bearer":["egp:account:token:otherSessionsForAccountClientService DELETE"]}]}},"/account/api/oauth/sessions/kill/{accessToken}":{"delete":{"tags":["Account - OAuth"],"summary":"Kill an access token","operationId":"killAccessToken","security":[{"bearer":[]}],"parameters":[{"in":"path","name":"accessToken","schema":{"type":"string"},"required":true,"description":"The access token to kill"},{"in":"path","name":"killAllWithSameSource","schema":{"type":"boolean"},"required":false,"description":"Kill all with same source"}],"responses":{"204":{"description":"The access token was killed"}}}},"/account/api/oauth/token":{"post":{"tags":["Account - OAuth"],"summary":"Get an OAuth access token","operationId":"getAccessToken","security":[{"basic":[]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"allOf":[{"$ref":"#/components/schemas/OAuthGrantType"},{"type":"object","properties":{"deployment_id":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$"}}}],"examples":{"Authorization Code":{"grant_type":"authorization_code","code":"8b0a23cb43af46cb972806f4025a9cba"},"Client Credentials":{"grant_type":"client_credentials"}}}}}},"responses":{"200":{"description":"The OAuth token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthToken"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error_description":{"type":"string"},"error":{"type":"string","examples":["invalid_grant"]}}}]}}}}}}},"/account/api/oauth/verify":{"get":{"tags":["Account - OAuth"],"summary":"Get info about an access token","operationId":"verifySession","security":[{"bearer":[]}],"responses":{"200":{"description":"Information about the access token","content":{"application/json":{"schema":{"type":"object","required":["token","session_id","token_type","client_id","internal_client","client_service","expires_in","expires_at","auth_method"],"properties":{"token":{"type":"string"},"session_id":{"type":"string"},"token_type":{"type":"string","enum":["bearer"]},"client_id":{"$ref":"#/components/schemas/ClientID"},"internal_client":{"type":"boolean"},"client_service":{"type":"string"},"account_id":{"$ref":"#/components/schemas/AccountID"},"expires_in":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"},"auth_method":{"type":"string"},"display_name":{"type":"string"},"ext_auth_id":{"type":"string"},"ext_auth_type":{"type":"string"},"ext_auth_method":{"type":"string"},"app":{"type":"string"},"in_app_id":{"type":"string"},"device_id":{"type":"string"},"scope":{"type":"array","items":{"$ref":"#/components/schemas/Scope"}},"product_id":{"type":"string"},"sandbox_id":{"type":"string"},"deployment_id":{"type":"string"},"application_id":{"type":"string"},"acr":{"type":"string"},"auth_time":{"type":"string","format":"date-time"},"perms":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}}}}}}}}}},"/account/api/public/account":{"get":{"tags":["Accounts - Public"],"summary":"Get accounts by their ids","security":[{"bearer":[]}],"parameters":[{"in":"query","name":"accountId","schema":{"type":"array","items":{"type":"string"}},"required":true,"description":"An account id"}],"responses":{"200":{"description":"The accounts you queried","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicAccount"}}}}}}}},"/account/api/public/account/{accountId}":{"get":{"tags":["Accounts - Public"],"summary":"Get an account by id","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"An account id"}],"responses":{"200":{"description":"An account","content":{"application/json":{"schema":{"type":"object","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/AccountID"},"displayName":{"type":"string"},"country":{"type":"string","examples":["US"]},"preferredLanguage":{"type":"string","examples":["en"]}}}}}}},"description":"**Permission Required**: [`egp:account:public:account READ`](https://egs.jaren.wtf/#resource=egp:account:public:account&action=2)","security":[{"bearer":["egp:account:public:account READ"]}]}},"/account/api/public/account/{accountId}/deviceAuth":{"post":{"tags":["Accounts - Public"],"summary":"Create device auth","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"}],"responses":{},"description":"**Permission Required**: [`egp:account:public:account:externalAuths CREATE`](https://egs.jaren.wtf/#resource=egp:account:public:account:externalAuths&action=1)","security":[{"bearer":["egp:account:public:account:externalAuths CREATE"]}]}},"/account/api/public/account/{accountId}/deviceAuth/{deviceId}":{"delete":{"tags":["Accounts - Public"],"summary":"Delete device auth","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"},{"in":"path","name":"deviceId","schema":{"$ref":"#/components/schemas/DeviceAuth/properties/deviceId"},"required":true,"description":"The device id to delete"}],"responses":{},"description":"**Permission Required**: [`egp:account:public:account:deviceAuths DELETE`](https://egs.jaren.wtf/#resource=egp:account:public:account:deviceAuths&action=8)","security":[{"bearer":["egp:account:public:account:deviceAuths DELETE"]}]}},"/account/api/public/account/{accountId}/externalAuths":{"get":{"tags":["Accounts - Public"],"summary":"Get external auths","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"}],"responses":{"200":{"description":"The user's external auths","content":{"application/json":{"schema":{"type":"array"}}}}},"description":"**Permission Required**: [`egp:account:public:account:externalAuths READ`](https://egs.jaren.wtf/#resource=egp:account:public:account:externalAuths&action=2)","security":[{"bearer":["egp:account:public:account:externalAuths READ"]}]},"post":{"tags":["Accounts - Public"],"summary":"Create an external auth","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalAuthRequest"}}}},"responses":{},"description":"**Permission Required**: [`egp:account:public:account:externalAuths CREATE`](https://egs.jaren.wtf/#resource=egp:account:public:account:externalAuths&action=1)","security":[{"bearer":["egp:account:public:account:externalAuths CREATE"]}]}},"/account/api/public/account/{accountId}/externalAuths/{externalAuthType}":{"delete":{"tags":["Accounts - Public"],"summary":"Delete an external auth","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"An account id"},{"in":"path","name":"externalAuthType","schema":{"type":"string"},"required":true,"description":"The external auth type"}],"responses":{},"description":"**Permission Required**: [`account:public:account:externalAuths DELETE`](https://egs.jaren.wtf/#resource=account:public:account:externalAuths&action=8)","security":[{"bearer":["account:public:account:externalAuths DELETE"]}]}},"/account/api/public/account/{accountId}/platformToken/{externalAuthType}/{clientId}":{"post":{"tags":["Accounts - Public"],"summary":"Get platform token","parameters":[{"in":"path","name":"accountId","schema":{"$ref":"#/components/schemas/AccountID"},"required":true,"description":"Your account id"},{"in":"path","name":"externalAuthType","schema":{"type":"string"},"required":true,"description":"An external auth method"},{"in":"path","name":"clientId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"The platform token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformToken"}}}}},"description":"**Permission Required**: [`egp:account:public:account READ`](https://egs.jaren.wtf/#resource=egp:account:public:account&action=2)","security":[{"bearer":["egp:account:public:account READ"]}]}},"/api/version":{"get":{"tags":["Version"],"summary":"Get the current version","responses":{"200":{"description":"Version info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}}}}}},"components":{"schemas":{"ExternalAuthRequest":{"type":"object","required":["authType","externalAuthToken"],"properties":{"authType":{"type":"string"},"externalAuthToken":{"type":"string"}}},"ClientID":{"type":"string","pattern":"^(?:[0-9a-f]{32}|xyza7891[0-9a-zA-Z]{24})$","examples":["ec684b8c687f479fadea3cb2ad83f5c6","xyza7891ov4bjltiTDG4lfbFq7aPJjm1"]},"Error":{"type":"object","required":["errorCode","errorMessage"],"properties":{"errorCode":{"type":"string","examples":["errors.com.epicgames.common.server_error"]},"errorMessage":{"type":"string","examples":["Sorry an error occurred and we were unable to resolve it (tracking id: [00000000-0000-0000-0000-000000000000])"]},"messageVars":{"type":"array","items":{"type":"string"}},"numericErrorCode":{"type":"integer","examples":1000},"originatingService":{"type":"string","examples":["com.epicgames.account.public","com.epicgames.account-policy","fortnite"]},"intent":{"type":"string","examples":["unknown","prod","stage"]}},"description":"This represents an error response"},"AccountID":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$","examples":["8b0a23cb43af46cb972806f4025a9cba"],"description":"This represents a unique id for an epic games account"},"OAuthGrantType":{"oneOf":[{"$ref":"#/components/schemas/OAuthGrantTypeAuthorizationCode"},{"$ref":"#/components/schemas/OAuthGrantTypeClientCredentials"},{"$ref":"#/components/schemas/OAuthGrantTypeContinuationToken"},{"$ref":"#/components/schemas/OAuthGrantTypeDeviceAuth"},{"$ref":"#/components/schemas/OAuthGrantTypeDeviceCode"},{"$ref":"#/components/schemas/OAuthGrantTypeExchangeCode"},{"$ref":"#/components/schemas/OAuthGrantTypeExternalAuth"},{"$ref":"#/components/schemas/OAuthGrantTypeOTP"},{"$ref":"#/components/schemas/OAuthGrantTypePassword"},{"$ref":"#/components/schemas/OAuthGrantTypeRefreshToken"},{"$ref":"#/components/schemas/OAuthGrantTypeTokenToToken"}],"discriminator":{"propertyName":"grant_type","mapping":{"authorization_code":"#/components/schemas/OAuthGrantTypeAuthorizationCode","client_credentials":"#/components/schemas/OAuthGrantTypeClientCredentials","continuation_token":"#/components/schemas/OAuthGrantTypeContinuationToken","device_auth":"#/components/schemas/OAuthGrantTypeDeviceAuth","device_code":"#/components/schemas/OAuthGrantTypeDeviceCode","exchange_code":"#/components/schemas/OAuthGrantTypeExchangeCode","external_auth":"#/components/schemas/OAuthGrantTypeExternalAuth","otp":"#/components/schemas/OAuthGrantTypeOTP","password":"#/components/schemas/OAuthGrantTypePassword","refresh_token":"#/components/schemas/OAuthGrantTypeRefreshToken","token_to_token":"#/components/schemas/OAuthGrantTypeTokenToToken"}}},"OAuthGrantTypeClientCredentials":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["client_credentials"]}}},"OAuthGrantTypeExternalAuth":{"type":"object","required":["grant_type","external_auth_type","external_auth_token"],"properties":{"grant_type":{"type":"string","enum":["external_auth"]},"external_auth_type":{"type":"string"},"external_auth_token":{"type":"string"}}},"OAuthGrantTypeOTP":{"type":"object","required":["grant_type","challenge"],"properties":{"grant_type":{"type":"string","enum":["otp"]},"challenge":{"$ref":"#/components/schemas/TFAChallenge"},"otp":{"type":"string","pattern":"^\\d{6}$"}}},"OAuthGrantTypePassword":{"type":"object","required":["grant_type","username","password"],"properties":{"grant_type":{"type":"string","enum":["password"]},"username":{"type":"string"},"password":{"type":"string","format":"password"}}},"OAuthGrantTypeRefreshToken":{"type":"object","required":["grant_type","refresh_token"],"properties":{"grant_type":{"type":"string","enum":["refresh_token"]},"refresh_token":{"type":"string"}}},"OAuthGrantTypeDeviceCode":{"type":"object","required":["grant_type","device_code"],"properties":{"grant_type":{"type":"string","enum":["device_code"]},"device_code":{"$ref":"#/components/schemas/DeviceAuthorization/properties/device_code"}}},"DeviceAuthorization":{"type":"object","required":["user_code","device_code","verification_uri","verification_uri_complete","prompt","expired_in","interval","client_id"],"properties":{"user_code":{"type":"string","pattern":"^[0-9A-Z]{8}$"},"device_code":{"type":"string","pattern":"^[0-9A-Z]{16}\\.[0-9A-Z]{8}$","contentEncoding":"base64"},"verification_uri":{"type":"string","format":"uri"},"verification_uri_complete":{"type":"string","format":"uri"},"prompt":{"type":"string","examples":["login"]},"expires_in":{"type":"integer","examples":[600]},"interval":{"type":"integer","examples":[10]},"client_id":{"$ref":"#/components/schemas/ClientID"},"scope":{"$ref":"#/components/schemas/Scope"}}},"OAuthGrantTypeTokenToToken":{"type":"object","required":["grant_type","access_token"],"properties":{"grant_type":{"type":"string","enum":["token_to_token"]},"access_token":{"type":"string"}}},"Scope":{"type":"string","enum":["openid","offline_access","basic_profile","friends_list","friends_management","presence","library","country","relevant_cosmetics","email"]},"Version":{"type":"object","required":["app","serverDate","overridePropertiesVersion","cln","build","moduleName","buildDate","version","branch","modules"],"properties":{"app":{"type":"string"},"serverDate":{"type":"string","format":"date-time"},"overridePropertiesVersion":{"type":"string"},"cln":{"type":"string"},"build":{"type":"string"},"moduleName":{"type":"string"},"buildDate":{"type":"string","format":"date-time"},"version":{"type":"string"},"branch":{"type":"string"},"modules":{"type":"object","additionalProperties":{"type":"object","required":["cln","build","buildDate","version","branch"],"properties":{"cln":{"type":"string"},"build":{"type":"string"},"buildDate":{"type":"string","format":"date-time"},"version":{"type":"string"},"branch":{"type":"string"}}}}}},"OAuthGrantTypeDeviceAuth":{"type":"object","required":["grant_type","account_id","device_id","secret"],"properties":{"grant_type":{"type":"string","enum":["device_auth"]},"account_id":{"$ref":"#/components/schemas/AccountID"},"device_id":{"$ref":"#/components/schemas/CreatedDeviceAuth/properties/deviceId"},"secret":{"$ref":"#/components/schemas/CreatedDeviceAuth/properties/secret"}}},"OAuthGrantTypeAuthorizationCode":{"type":"object","required":["grant_type","code"],"properties":{"grant_type":{"type":"string","enum":["authorization_code"]},"code":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$"}}},"OAuthGrantTypeExchangeCode":{"type":"object","required":["grant_type","exchange_code"],"properties":{"grant_type":{"type":"string","enum":["exchange_code"]},"exchange_code":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$"}}},"OAuthGrantTypeContinuationToken":{"type":"object","required":["grant_type","continuation_token"],"properties":{"grant_type":{"type":"string","enum":["continuation_token"]},"continuation_token":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$"}}},"TFAChallenge":{"type":"string","contentEncoding":"base64","pattern":"^([0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})\\.([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\.(email|authenticator|sms|epicapp)$"},"CreatedDeviceAuth":{"type":"object","required":["deviceId","accountId","secret","created"],"properties":{"deviceId":{"type":"string","pattern":"^[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15}$"},"accountId":{"$ref":"#/components/schemas/AccountID"},"secret":{"type":"string","pattern":"^[0-9A-Z]{32}$"},"userAgent":{"type":"string"},"created":{"type":"object","properties":{"location":{"type":"string"},"ipAddress":{"type":"string"},"dateTime":{"type":"string","format":"date-time"}}}}},"PublicAccount":{"type":"object","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/AccountID"},"displayName":{"type":"string"}}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"servers":[{"url":"https://egp-idsoc-proxy-prod.ol.epicgames.com"}]}