-
Notifications
You must be signed in to change notification settings - Fork 70
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
How to send SMS ? #99
Comments
Not at present -- I don't have Skype SMS set up on my account, so I'm unsure what any of the API calls look like. If you're able to do it from Skype for Web and track the HTTP requests it makes, we can look into reproducing it here, though it may be tricky to test locally. |
When you have skype credit you can call or sms a phone number. same windows as chat. |
Any news about this demand? |
My request above still stands, as I've not touched Skype since then, let alone the SMS parts. |
With SkPy, or in Skype for Web? If you can successfully send a message with the latter but not the former, please get a sample HTTP request from your browser so we can tell what it's doing differently. Without that I don't know what needs to change. |
I checked the request on the web and tried to reproduce it on SkyPy the request creates the chat with the number and sends the sms but after a few seconds it gets the message as in the photo above you want it to send as is the headers, body and which endpoint make the requisition? |
All of the above, same as what you'd get using |
The parameter requestId is a str(uuid4()).
|
You've leaked your tokens in there, best logout that session ASAP. So there's a few things going on here that probably want handling:
Does this work? (replacing +441234567890 with an actual contact's number) chat = sk.chats["4:+441234567890"]
chat.sendRaw(
messagetype="RichText/Sms",
content="""<sms alt="Message text"><encoded_body>Message text</encoded_body></sms>""",
imdisplayname="{0}".format(sk.user.name),
) If not, does it work with the entire content line you quoted above? |
The test created the message just like in my tests here but the sms is not sent for some reason. |
Even with the full HTML message content? |
Yes, i try with the full HTML message content and not worked |
would be great if you can add reading/writing sms to this great project |
I don't have the Skype credit or a subscription to test this with, so this won't go anywhere unless someone can reliably reproduce a working Skype for Web request for sending an SMS using SkPy, like the one I proposed above. It's a request to |
I was able to send SMS using
I actually have this in code: # Extract phone number from chat ID (format: 4:+11123456789)
phone_number = chat_id.split(':')[1]
request_id = str(uuid.uuid4())
# Construct SMS XML content
sms_content = f"""<sms alt="{message}">
<restApiVersion>2</restApiVersion>
<encoded_body>{message}</encoded_body>
<defaults>
<skype>
<deliveryReportVersion>chatservice</deliveryReportVersion>
<uiVersion>1418/8.133.0.202</uiVersion>
</skype>
<control>
<flowId>skype.S4L.client.sms.1way</flowId>
<deliveryMethod>reliable</deliveryMethod>
</control>
<content>
<body>{message}</body>
</content>
</defaults>
<bulkItems>
<bulkItem>
<requestId>{request_id}</requestId>
<recipient>
<address>{phone_number}</address>
</recipient>
</bulkItem>
</bulkItems>
</sms>"""
logging.info(f"Sending as SMS message to {phone_number}")
chat.sendRaw(
messagetype="RichText/Sms",
content=sms_content,
imdisplayname="{0}".format(sk.user.name),
) |
Hello,
First thank you for such nice project it is really great,
before I was using Skype4Py for sending SMS for Pethospital appointment, I was hopping there is same feature in SkPy
I have tried the web.skype.com and it allows it, so should be possible
I see in doc chat.rst there is SMS capability
but I do not see in code the function allowing doing it .
Is this feature available ? If not, how to add it ?
Thanks,
The text was updated successfully, but these errors were encountered: