Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify not verified sessions/devices #4523

Closed
cmakasy opened this issue Nov 12, 2024 · 2 comments
Closed

verify not verified sessions/devices #4523

cmakasy opened this issue Nov 12, 2024 · 2 comments
Labels
T-Other Questions, user support, anything else

Comments

@cmakasy
Copy link

cmakasy commented Nov 12, 2024

Hi, after I have created a new session/device using

client = sdk.createClient({
    baseUrl: homeserverUrl,
    userId: userId,
    deviceId: deviceId,
    accessToken: accessToken,
  });

With the command
const deviceList = await client.getDevices();
I get all devices for the current user. And now I want to verify all non verified devices programmatically.

I have no idea how to do. Does someone know how to do that ? Many thanks in advance

@dosubot dosubot bot added the T-Other Questions, user support, anything else label Nov 12, 2024
@richvdh
Copy link
Member

richvdh commented Nov 13, 2024

You can try #matrix-dev:matrix.org for support in using this library.

Short answer: it sounds like you want CryptoApi.requestDeviceVerification.

@richvdh richvdh closed this as completed Nov 13, 2024
@cmakasy
Copy link
Author

cmakasy commented Nov 14, 2024

Many thanks for your answer. It works partly. Now I would like to describe the problem in detail.

I start the client in a express application with node index.js and this process creates a non verified device. As I use encrypted rooms only, I need to verify the devices after their creation. I tried a lot, but unforunately without success.

const verificationRequest = await client
      .getCrypto()
      .requestDeviceVerification(client.getUserId(), client.getDeviceId()); //"CZMHWRRWPG"
    console.log("VERIFICATION REQUEST", verificationRequest.transactionId);

What will I do next ? Really, I have no idea. Could you give me another hint, please. Many thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Other Questions, user support, anything else
Projects
None yet
Development

No branches or pull requests

2 participants