-
Notifications
You must be signed in to change notification settings - Fork 24
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
Error #50
Comments
Thank you for your report. Could you tell me more about how the error happened? Are you using authentication with simple credentials (skype login and password)? Is it a temporary error? Is it a new error (were you able to connect to Skype before)? |
Since he is using https://github.com/matrix-hacks/matrix-puppet-skype I can answser a bit: (I am unable to reproduce his issue, too, and told him to make an issue here, since it appears to be within the skype-http library itself) This is authenticating using username / password,
https://github.com/matrix-hacks/matrix-puppet-skype/blob/master/client.js#L37 |
Thank you. I'd like you to try a few things. Here is the JS version of function subscribeToResources(ioOptions, registrationToken) {
return __awaiter(this, void 0, void 0, function* () {
// TODO(demurgos): typedef
// tslint:disable-next-line:typedef
const requestDocument = {
interestedResources: [
"/v1/threads/ALL",
"/v1/users/ME/contacts/ALL",
"/v1/users/ME/conversations/ALL/messages",
"/v1/users/ME/conversations/ALL/properties",
],
template: "raw",
channelType: "httpLongPoll",
};
const requestOptions = {
uri: messagesUri.subscriptions(registrationToken.host),
cookies: ioOptions.cookies,
body: JSON.stringify(requestDocument),
headers: {
RegistrationToken: registrationToken.raw,
},
};
const res = yield ioOptions.io.post(requestOptions);
if (res.statusCode !== 201) {
return Promise.reject(new incident_1.Incident("net", `Unable to subscribe to resources: statusCode: ${res.statusCode} body: ${res.body}`));
}
// Example response:
// {
// "statusCode": 201,
// "body": "{}",
// "headers": {
// "cache-control": "no-store, must-revalidate, no-cache",
// "pragma": "no-cache",
// "content-length": "2",
// "content-type": "application/json; charset=utf-8",
// "location": "https://db5-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions/0",
// "x-content-type-options": "nosniff",
// "contextid": "tcid=3434983151221922702,server=DB5SCH101121535",
// "date": "Sat, 14 May 2016 16:41:17 GMT",
// "connection": "close"
// }
// }
});
}
|
function subscribeToResources(ioOptions, registrationToken) {
return __awaiter(this, void 0, void 0, function* () {
// TODO(demurgos): typedef
// tslint:disable-next-line:typedef
const requestDocument = {
interestedResources: [
// "/v1/threads/ALL",
// "/v1/users/ME/contacts/ALL",
// "/v1/users/ME/conversations/ALL/messages",
// "/v1/users/ME/conversations/ALL/properties",
],
template: "raw",
channelType: "httpLongPoll",
};
const requestOptions = {
uri: messagesUri.subscriptions(registrationToken.host),
cookies: ioOptions.cookies,
body: JSON.stringify(requestDocument),
headers: {
RegistrationToken: registrationToken.raw,
},
}; I hope I understand correctly. I did so. and got the same error as in the beginning |
Thank you, that's what I had in mind. |
Acquired SkypeToken
Acquired RegistrationToken
{ net: Unable to subscribe to resources: statusCode: 403 body:
at /laptop/node_modules/skype-http/dist/lib-es2015/lib/login.js:163:35
at Generator.next ()
at fulfilled ( /laptop/node_modules/skype-http/dist/lib-es2015/lib/login.js:4:58)
at process._tickCallback (internal/process/next_tick.js:109:7) name: 'net', data: {} }
The text was updated successfully, but these errors were encountered: