Jump to content
McKay Development

Listener is not active


Recommended Posts

const { EAuthTokenPlatformType, LoginSession } = require('steam-session');
async function main() {
    let session = new LoginSession(EAuthTokenPlatformType.SteamClient)
    let startResult = await session.startWithCredentials({
        accountName: 'xxxxx',
        password: 'xxxx'
    session.on('steamGuardMachineToken', () => {
        console.log('\nReceived new Steam Guard machine token');
        console.log(`Machine Token: ${session.steamGuardMachineToken}`);
    session.on('authenticated', async () => {
        console.log('\nAuthenticated successfully! Printing your tokens now...');
        console.log(`SteamID: ${session.steamID}`);
        console.log(`Account name: ${session.accountName}`);
        console.log(`Access token: ${session.accessToken}`);
        console.log(`Refresh token: ${session.refreshToken}`);
        // We can also get web cookies now that we've negotiated a session
        let webCookies = await session.getWebCookies();
        console.log('Web session cookies:');
        let decodedJwt = decodeJwt(session.accessToken);
        console.log(`\nWe logged in using IP ${decodedJwt.ip_subject}`);
    session.on('timeout', () => {
        console.log('This login attempt has timed out.');
    session.on('error', (err) => {
        // This should ordinarily not happen. This only happens in case there's some kind of unexpected error while
        // polling, e.g. the network connection goes down or Steam chokes on something.
        console.log(`ERROR: This login attempt has failed! ${err.message}`);
c:\Program Files\nodejs\node_modules\steam-session\dist\helpers.js:17
    let err = new Error(errorMessage || resultMsg);
Error: RateLimitExceeded
    at eresultError (c:\Program Files\nodejs\node_modules\steam-session\dist\helpers.js:17:15)
    at AuthenticationClient.sendRequest (c:\Program Files\nodejs\node_modules\steam-session\dist\AuthenticationClient.js:212:46)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AuthenticationClient.startSessionWithCredentials (c:\Program Files\nodejs\node_modules\steam-session\dist\AuthenticationClient.js:63:22)
    at async LoginSession.startWithCredentials (c:\Program Files\nodejs\node_modules\steam-session\dist\LoginSession.js:161:38)
    at async main (c:\Program Files\nodejs\LoginSession.js:14:27) {
  eresult: 84
Edited by awuming
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...