kandy-cpaas2-sample-presence
Presence app
This app is used to create a channel between two users via Presence APIs.
User manual
- Create an account on AT&T portal via Register now for a free account.
- Open 2 instances of
index.html in the browser for User1 and User2.
- Enter the server URL, for e.g.,
- Choose to get accessToken by Password Grant flow or Client Credentials flow.
- Login using two different users’ credentials in both the browser windows.
- For Password Grant flow, enter
- clientId
- emailId
- password
- For Client Credentials Grant flow, enter
- Click Login
- After successful login you will get an accessToken for User1 and User2, that is used to send/receive presence of each other.
- Click Subscribe button in both the browser windows to create the webrtc channel.
- Update User1’s presence and submit to let your subscribers know about your presence.
- Enter the User2’s User ID into the User1’s window under Subscribe (watch) user ⟶ UserId(s) input field; e.g., username@domain.com
- Click on Subscribe/Unsubscribe button to receive (or not) the presence details about the provided user.
- Enter the User2’s User ID into the User1’s window under Fetch and Get presence ⟶ UserId(s) input field; e.g., username@domain.com
- Click on Fetch button to fetch the presence of the User2.
- Open the User2’s browser window and update the presence details and check the User1’s brower window for updated presence of User2.
Notes
Development
To setup the project repository, run these commands
git clone https://github.com/hclsampleapps/kandy-cpaas2-sample-presence.git
cd kandy-cpaas2-sample-presence
Then, open index.html in the browser to view the app.
Branching strategy
To learn about the branching strategy, contribution & coding conventions followed in the project, please refer GitFlow based branching strategy for your project repository