-
Notifications
You must be signed in to change notification settings - Fork 33
Client
const { Client } = require('epicgames-client');
let client = new Client({
email: '',
password: '',
debug: null, // if you need console/file output with logs. Simple you can use `console.log`
useWaitingRoom: true, // false to ignore waiting room (epicgames load balancer)
http: {
// settings for lib https://github.com/request/request
}
});
- build - Desktop's launcher version
- UEBuild - Unreal Engine version
-
appName - Application name, everytime
Launcher
. -
account - logged account's object
- id
- displayName
- firstName
- lastName
- ageGroup
- country
- preferredLanguage
- lastLogin
- failedLoginAttempts
Initialize client
Login to an account.
-
options [
Object
] (optional)-
email [
String
] (optional) -
password [
String
] (optional) -
twoFactorCode [
String|Number|Function
] (optional)
-
email [
Register an account.
-
options [
Object
]-
country [
String
] - e.g.US
,PL
-
firstName [
String
] -
lastName [
String
] -
displayName [
String
] -
email [
String
] -
password [
String
] -
recaptchaResponse [
String
]
-
country [
Resend e-mail verification.
Kill account's session on epicgames servers.
Enable two factor authentication. Returns object with
secret
andotpauth
if successed orfalse
on failature.
-
type [
String
] -authenticator
oremail
-
twoFactorCode [
String|Integer|Function
] Function have two parameterssecret
andotpauth
await client.enableTwoFactor('authenticator', (secret, otpauth) => {
fs.writeFileSync('./secret.txt', secret);
return authenticator.generateToken(secret);
})
Disable two factor authentication. Returns
true
orfalse
.
-
type [
String
] -authenticator
oremail
Checks if
value
is account's id.
-
value [
String
]
Checks if
value
is account's display name.
-
value [
String
]
Returns array of domains using by EpicGames.
Returns game object or
false
if can't run game.
-
game [
Object
] - game library, e.g. epicgames-fortnite-client -
options [
Object
] (optional) - game library constructor options
-
language [
String
] - e.g.en
,en-US
,pl
,pl-PL
Returns
User
object orfalse
if user not found.
-
user [
String
] - user's display name or id
Returns array of
User
objects.
-
arr [
Array
] - Array with names or ids (can be mixed)
Returns account's id, display name and extarnalAuths or
false
if user not found. I recommend usegetProfile
method.
-
displayName [
String
] - user's display name
Returns array of your friends (
Friend
objects).
-
includePending [
Boolean
] (optional) - whether including pending friends (invite requests).
Returns array of your pending friends.
Verifying given account is your friend.
-
user [
String
] - user's display name or id
Returns array of your blacklisted friends.
Blocking a friend. Returns
Friend
orfalse
depending on whether the operation was successful.
-
user [
String
] - user's display name or id
Removing a friend. Returns
Friend
orfalse
depending on whether the operation was successful.
-
user [
String
] - user's display name or id
Sending a friend invite request. Returns
Friend
orfalse
depending on whether the operation was successful.
-
user [
String
] - user's display name or id
Accepting friend's invitation. Alias for method inviteFriend
-
user [
String
] - user's display name or id
Declining friend's invitation. Alias for method removeFriend
-
user [
String
] - user's display name or id
Returns object with informations about the current client (build etc.).
Returns "DEPRECATED" or "NOT_DEPRECATED"