Send an IM with UCWA - Hints, Tips & Extra Goodies - Learn More





0/5 (0 vote)
How to send and IM with UCWA
This is part 5 of a 5 part series.
- An introduction to Sending An IM With UCWA
- Part 1 - Send An IM With UCWA - Prerequisites
- Part 2 - Send An IM With UCWA - Creating the Application
- Part 3 - Send An IM With UCWA - Sending the IM
- Part 4 - Send An IM With UCWA - Setting Presence
- Part 5 - Send An IM With UCWA - Hints, Tips & Extra Goodies
Keep Alive
UCWA will automatically shut down Applications and Conversations after a few minutes, if it does not receive a 'Keep Alive' signal from the client in a timely fashion. Whilst any IM or other activity will trigger this cycle, in circumstances where there are no IMs being sent frequently, a 'Keep Alive' must be sent to maintain an active application.
In my experience, I've found sending this 'Keep Alive' every 3 minutes (180 seconds) during idle times is sufficient.
Triggering a Keep Alive is performed by a single POST to the interface.
POST /ucwa/oauth/v1/applications/12345678/me/reportMyActivity
No POST data is required.
HTML Messages
By default, UCWA will send Instant Messages as plain text. You can, however, add HTML as a modality in order to send rich text messages via IM.
This is achieved by a single POST to the interface.
POST /ucwa/oauth/v1/applications/12345678/me/makeMeAvailable
With the POST data being:
{"SupportedModalities":["Messaging"],"supportedMessageFormats":["Plain","Html"]}