Skip to content

401 Unauthorized when registering account #37

@Shipibo303

Description

@Shipibo303

I get 401 - Unauthorized error when sending a verification code.

This is the code I used to verify the account:

`const protocolStore = new Signal.ProtocolStore(new Storage("./data"));
protocolStore.load();
const accountManager = new Signal.AccountManager("+420XXXXX", "XXCXX", protocolStore);

rl.question("Insert code: ", function(res) {
console.log(res);
accountManager.registerSingleDevice(res.trim()).then(result => {
console.log("Registered account.");
rl.close();
});
}); `

It didn't work with any number I tried.

This is the console output:

(node:93924) UnhandledPromiseRejectionWarning: HTTPError: promiseAjax: error response; code: 401 at HTTPError (D:\SCRIPTS\DignalServer\signal_bridge\node_modules\@throneless\libsignal-service\src\WebAPI.js:389:13) at resultPromise.then.result (D:\SCRIPTS\DignalServer\signal_bridge\node_modules\@throneless\libsignal-service\src\WebAPI.js:345:13) at process._tickCallback (internal/process/next_tick.js:68:7) Original stack: Error at _outerAjax (D:\SCRIPTS\DignalServer\signal_bridge\node_modules\@throneless\libsignal-service\src\WebAPI.js:383:19) at _ajax (D:\SCRIPTS\DignalServer\signal_bridge\node_modules\@throneless\libsignal-service\src\WebAPI.js:502:14) at Object.registerKeys (D:\SCRIPTS\DignalServer\signal_bridge\node_modules\@throneless\libsignal-service\src\WebAPI.js:737:14) at createAccount.then.then.then.keys (D:\SCRIPTS\DignalServer\signal_bridge\node_modules\@throneless\libsignal-service\src\AccountManager.js:134:27) at process._tickCallback (internal/process/next_tick.js:68:7) (node:93924) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:93924) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Do someone know how to get past this issue or what I'm doing wrong?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions