You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 9, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 9, 2019. It is now read-only.
There was a code on how to login in a Microsoft account at samczsun/Skype4J#128 , but the message was deleted (and the user account doesn't exist anymore)
That's what I've been using since the mentioned ticket, I made some minor changes to the original poster's source but this has been working fine for me.
The changes I made just sanitize the XML email/password, and acknowledge the "skypeId" returned in my code block above, which is very important if you're using a migrated (skypename -> email) account, which I have been using. I've been having some issues with the auth sticking, though, and sometimes my bot will randomly log out and stay that way until I address it. Until I figure that out, I'll probably wait to make a pull request.
@Erezbiox1 any chance you got a fork of this with the fix applied for logging in with email and password or provide a short guide on how to get this working? Thank you!
@Erezbiox1 Thanks a lot for that, integrated it locally with Skype4J, tested it and it works, but having issues using the packaged Skype4J in another project.
Getting the following error: Exception in thread "main" java.lang.NoSuchMethodError: org.json.JSONArray.forEach(Ljava/util/function/Consumer;)V at com.samczsun.skype4j.internal.client.MSFTSkypeClient$LiveLoginHelper.parsePayload(MSFTSkypeClient.java:206) at com.samczsun.skype4j.internal.client.MSFTSkypeClient$LiveLoginHelper.getXTokenObject(MSFTSkypeClient.java:267) at com.samczsun.skype4j.SkypeBuilder.build(SkypeBuilder.java:134)
After adding the class to the project made the following change to SkypeBuilder
`public Skype build() {
if (resources.isEmpty()) {
throw new IllegalArgumentException("No resources selected");
}
if (password != null && !username.contains("@")) {
return new FullClient(username, password, resources, customLogger, errorHandlers);
} else if (chatId != null && !username.contains("@")) {
return new GuestClient(username, chatId, resources, customLogger, errorHandlers);
} else if (username.contains("@")) {
JSONObject object = null;
try {
object = MSFTSkypeClient.LiveLoginHelper.getXTokenObject(username, password);
} catch (Exception e) {
throw new IllegalArgumentException("Bad response");
}
Hello. Good news! I have added support for Microsoft accounts to JavaSkype. There are no API changes besides the fact that logging with a Microsoft account (e.g. foo.bar@hotmail.com) should work.
Please update to version 1.0.22 (I have copied the <dependency> block below). Open a new issue for any problem you may have, but do send me the debug logs when opening an issue (simply call setDebug to create a debug file).
@delthas thanks for tackling this issue in such a speedy fashion now :). There still seems to be a problem when using a Skype account that has been linked to a Microsoft account (as is the case for me). I can provide two debug logs (one for Skype login, one for Microsoft Account login) and would be quite willing to help resolve this -- kindly contact me via e-mail.
After doing the following steps skype.connect(); remains stuck Steps:
create a new skype object
initialize connection (skype.connect();)
get the groups you are into (skype.getGroups(); )
disconnect
*Notice that after doing this a few times the script will remain stuck at the skype.connect part
PS. sometimes it gives the following error: Exception in thread "Skype-Receiver-Thread" java.lang.IllegalArgumentException at fr.delthas.skype.NotifConnector.parseEntity(NotifConnector.java:792) at fr.delthas.skype.NotifConnector.updateThread(NotifConnector.java:738) at fr.delthas.skype.NotifConnector.processPacket(NotifConnector.java:254) at fr.delthas.skype.NotifConnector.lambda$new$0(NotifConnector.java:73) at java.lang.Thread.run(Thread.java:745)
Activity
MrPowerGamerBR commentedon Jan 10, 2017
There was a code on how to login in a Microsoft account at samczsun/Skype4J#128 , but the message was deleted (and the user account doesn't exist anymore)
Maybe @Manevolent still has his fix for Skype4J?
delthas commentedon Jan 10, 2017
I think I know how to do this, the process is detailed here: https://github.com/msndevs/protocol-docs/wiki/Authentication#microsoft-accounts
Manevolent commentedon Jan 10, 2017
I do!
https://gist.github.com/Manevolent/1c6bc379c10c1e50358e8f2e2356fef7
That's what I've been using since the mentioned ticket, I made some minor changes to the original poster's source but this has been working fine for me.
The changes I made just sanitize the XML email/password, and acknowledge the "skypeId" returned in my code block above, which is very important if you're using a migrated (skypename -> email) account, which I have been using. I've been having some issues with the auth sticking, though, and sometimes my bot will randomly log out and stay that way until I address it. Until I figure that out, I'll probably wait to make a pull request.
Also, maven deps:
Also, JSoup is used, too.
klingan commentedon May 21, 2017
@Manevolent since we are 4 months later, were you able to resolve your auth issues? A pull request would still come in handy 💩
simk0024 commentedon May 26, 2017
I think this should be put in higher priority, as all skype account are forced to link with Microsoft now...
ruha9005 commentedon Jun 9, 2017
May be it can help:
https://skpy.t.allofti.me/protocol/login.html
ItsGravix commentedon Aug 13, 2017
@Manevolent I get this:
org.json.JSONException: JSONObject["wst:RequestedSecurityToken"] not found.Erezbiox1 commentedon Aug 24, 2017
Exception in thread "main" java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1
Erezbiox1 commentedon Aug 24, 2017
Can anyone please help me out on this?
Erezbiox1 commentedon Aug 24, 2017
Simply removing the line from the gist seems to work...
weird.
the line is "this.cookies.put(setCookie[0], setCookie[1]);"
metasonic commentedon Nov 7, 2017
@Erezbiox1 any chance you got a fork of this with the fix applied for logging in with email and password or provide a short guide on how to get this working? Thank you!
delthas commentedon Nov 7, 2017
Hello, I will look into this this week. Sorry for the long delay. To be honest I wasn't sure if anyone needed this at all.
Erezbiox1 commentedon Nov 8, 2017
@metasonic Yes, here's the gist,

and here's the required libraries:
Do note, this only works with Skype4J
metasonic commentedon Nov 9, 2017
@Erezbiox1 Thanks a lot for that, integrated it locally with Skype4J, tested it and it works, but having issues using the packaged Skype4J in another project.
Getting the following error:
Exception in thread "main" java.lang.NoSuchMethodError: org.json.JSONArray.forEach(Ljava/util/function/Consumer;)V at com.samczsun.skype4j.internal.client.MSFTSkypeClient$LiveLoginHelper.parsePayload(MSFTSkypeClient.java:206) at com.samczsun.skype4j.internal.client.MSFTSkypeClient$LiveLoginHelper.getXTokenObject(MSFTSkypeClient.java:267) at com.samczsun.skype4j.SkypeBuilder.build(SkypeBuilder.java:134)After adding the class to the project made the following change to SkypeBuilder
`public Skype build() {
if (resources.isEmpty()) {
throw new IllegalArgumentException("No resources selected");
}
if (password != null && !username.contains("@")) {
return new FullClient(username, password, resources, customLogger, errorHandlers);
} else if (chatId != null && !username.contains("@")) {
return new GuestClient(username, chatId, resources, customLogger, errorHandlers);
} else if (username.contains("@")) {
JSONObject object = null;
try {
object = MSFTSkypeClient.LiveLoginHelper.getXTokenObject(username, password);
} catch (Exception e) {
throw new IllegalArgumentException("Bad response");
}
metasonic commentedon Nov 9, 2017
@delthas the framework you buit is the perfect plug and play not stress that you need for Skype, so, I for one love it and would like to see it grow
adds support for microsoft accounts (#24), starts work on #35
delthas commentedon Nov 10, 2017
Hello. Good news! I have added support for Microsoft accounts to JavaSkype. There are no API changes besides the fact that logging with a Microsoft account (e.g. foo.bar@hotmail.com) should work.
Please update to version 1.0.22 (I have copied the
<dependency>block below). Open a new issue for any problem you may have, but do send me the debug logs when opening an issue (simply call setDebug to create a debug file).indeterminatus commentedon Nov 10, 2017
@delthas thanks for tackling this issue in such a speedy fashion now :). There still seems to be a problem when using a Skype account that has been linked to a Microsoft account (as is the case for me). I can provide two debug logs (one for Skype login, one for Microsoft Account login) and would be quite willing to help resolve this -- kindly contact me via e-mail.
metasonic commentedon Nov 10, 2017
@delthas thanks a lot for this!
metasonic commentedon Nov 10, 2017
After doing the following steps skype.connect(); remains stuck
Steps:
*Notice that after doing this a few times the script will remain stuck at the skype.connect part
PS. sometimes it gives the following error:
Exception in thread "Skype-Receiver-Thread" java.lang.IllegalArgumentException at fr.delthas.skype.NotifConnector.parseEntity(NotifConnector.java:792) at fr.delthas.skype.NotifConnector.updateThread(NotifConnector.java:738) at fr.delthas.skype.NotifConnector.processPacket(NotifConnector.java:254) at fr.delthas.skype.NotifConnector.lambda$new$0(NotifConnector.java:73) at java.lang.Thread.run(Thread.java:745)Debug logs
https://www.dropbox.com/s/5mql7cyxs9na9tj/debug3.txt?dl=0
https://www.dropbox.com/s/e6uzyrjos7gfefl/debug2.txt?dl=1