Complete setup sign-in with code
client.app.login.response(LoginResponseParams { response, setupRequestID } body, RequestOptionsoptions?): LoginResponseResponse
POST/v1/app/setup/response
Finish setup sign-in with the code sent to the user email address. If the user needs a new account, the response includes account creation copy and username suggestions.
Complete setup sign-in with code
import BeeperDesktop from '@beeper/desktop-api';
const client = new BeeperDesktop();
const response = await client.app.login.response({
response: 'response',
setupRequestID: 'setupRequestID',
});
console.log(response);{
"matrix": {
"accessToken": "accessToken",
"deviceID": "deviceID",
"homeserver": "homeserver",
"userID": "userID"
},
"session": {
"e2ee": {
"crossSigning": true,
"firstSyncDone": true,
"hasBackedUpRecoveryKey": true,
"initialized": true,
"keyBackup": true,
"secrets": {
"masterKey": true,
"megolmBackupKey": true,
"recoveryKey": true,
"selfSigningKey": true,
"userSigningKey": true
},
"secretStorage": true,
"verified": true,
"recoveryKeyGeneratedAt": 0
},
"state": "needs-login",
"matrix": {
"deviceID": "deviceID",
"homeserver": "homeserver",
"userID": "userID"
},
"verification": {
"id": "id",
"availableActions": [
"accept"
],
"direction": "incoming",
"methods": [
"qr"
],
"purpose": "login",
"state": "requested",
"error": {
"code": "code",
"reason": "reason"
},
"otherDevice": {
"id": "id",
"name": "name"
},
"otherUserID": "otherUserID",
"qr": {
"data": "data"
},
"sas": {
"emojis": "emojis",
"decimals": "decimals"
}
}
}
}Returns Examples
{
"matrix": {
"accessToken": "accessToken",
"deviceID": "deviceID",
"homeserver": "homeserver",
"userID": "userID"
},
"session": {
"e2ee": {
"crossSigning": true,
"firstSyncDone": true,
"hasBackedUpRecoveryKey": true,
"initialized": true,
"keyBackup": true,
"secrets": {
"masterKey": true,
"megolmBackupKey": true,
"recoveryKey": true,
"selfSigningKey": true,
"userSigningKey": true
},
"secretStorage": true,
"verified": true,
"recoveryKeyGeneratedAt": 0
},
"state": "needs-login",
"matrix": {
"deviceID": "deviceID",
"homeserver": "homeserver",
"userID": "userID"
},
"verification": {
"id": "id",
"availableActions": [
"accept"
],
"direction": "incoming",
"methods": [
"qr"
],
"purpose": "login",
"state": "requested",
"error": {
"code": "code",
"reason": "reason"
},
"otherDevice": {
"id": "id",
"name": "name"
},
"otherUserID": "otherUserID",
"qr": {
"data": "data"
},
"sas": {
"emojis": "emojis",
"decimals": "decimals"
}
}
}
}