Changes

Jump to: navigation, search

CloudServices/Presence

1,393 bytes added, 13:40, 18 November 2013
2. Applications registration
'''Domain Ownership Validation'''
Mozilla Presence provides a web page at '''https://presence.mozilla.com/myapps'''where an application developer can connectby logging with her persona account.  Once logged in, the developer can fill a
form with a domain, name and description of the application to register.
Mozilla presence Presence generates a unique key of 1024 characters, the developer needs
to place in this URL: ''http://<domain>/__presence'' in a plain/text file that
can be reached pubicly.
Once the key is placed, the developer can hit a '''Verify''' button.
Mozilla presence Presence will then visit ''http://<domain>/__presence'' to verify
that the domain is owned by the developer.
'''Application ID'''
XXXOnce the domain has been verified, Mozilla Presence generates a unique id for the application, and displays an entry point the developer will need to visit to get status updates. The entry point is in the form of '''ws://<node>.presence.mozilla.com/<appid>''' and is a web socket the developer's application may connect to, in order to receive status updates. 
'''Activation of presence notifications'''
To activate the status update stream, the app developer needs to visit '''https://presence.mozilla.com/myapps''' and click on the '''Activate'''button located besides the application name (a developer may have several apps.) By clicking on '''Activate''', an API key is generated for the application anddisplayed besides the application. An API key is a string of 1024 chars. This API key has to be used by the application in order to get status updates. Getting status updates is done by connecting to the websocket located at'''ws://<node>.presence.mozilla.com/<appid>''' with the API key. Example:  {'key': 'XXX'}  ''XXX to be changed with the users id thing we talked about previously XXX.'' Once connected, the application will receive status updated as they happen, in the form of a list. Each element is composed of an e-mail and a status. Example:  [{'email': 'tarek@mozilla.com', 'status': 'online'}, {'email': 'bbangert@mozilla.com', 'status': 'offline'} ]
=== Applications permissions ===
Confirm
927
edits

Navigation menu