{"id":80,"date":"2018-06-12T13:13:13","date_gmt":"2018-06-12T13:13:13","guid":{"rendered":"http:\/\/techministry.blog\/?p=80"},"modified":"2018-06-12T13:13:13","modified_gmt":"2018-06-12T13:13:13","slug":"getting-a-list-of-active-users-in-unity-intercom","status":"publish","type":"post","link":"https:\/\/techministry.blog\/?p=80","title":{"rendered":"Getting A List of Active Users in Unity Intercom"},"content":{"rendered":"<p>At my church, we use <a href=\"http:\/\/techministry.blog\/2018\/04\/30\/bridging-traditional-wired-intercom-with-mobile-devices\/\">Unity Intercom<\/a> to expand our wired intercom system. It is very useful to have users who can be mobile and still stay in communication.<\/p>\n<p>We wanted to have the ability for our directors to see who is currently logged into Unity without having to log into the server or be logged into a Unity client on a device.<\/p>\n<p>After doing some digging and consulting the forums, I found out that if you go to this address:<\/p>\n<pre>http:\/\/unityserverIPaddr:20101\/userconfig<\/pre>\n<p>The Unity server will return a JSON dataset of the server information including the list of users.<\/p>\n<pre>\"users\":[{\"username\":\"josephadams\", \"title\":\"Joseph Adams\", \"allowedrcv\":\"63\", \"online\":\"0\", \"notify\":\"yes\", \"locksettings\":\"no\", \"lockchannels\":\"no\", \"groups\":[{\"groupNumber\":\"0\", \"transmit\":\"63\", \"receive\":\"63\"}]},{\"username\":\"technician\", \"title\":\"FG Tech User\", \"allowedrcv\":\"63\", \"online\":\"0\", \"notify\":\"yes\", \"locksettings\":\"no\", \"lockchannels\":\"no\", \"groups\":[{\"groupNumber\":\"0\", \"transmit\":\"9\", \"receive\":\"63\"}]}]<\/pre>\n<p>Once you&#8217;ve parsed that JSON into objects, you just have to check if the &#8220;online&#8221; property is 0 (false) or 1 (true) and you now know who is logged in!<\/p>\n<p>I added this to our director&#8217;s dashboard so now they can easily see who is available.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-81\" src=\"https:\/\/techministry.blog\/wp-content\/uploads\/2018\/06\/screen-shot-2018-06-12-at-9-10-05-am.png\" alt=\"Screen Shot 2018-06-12 at 9.10.05 AM\" width=\"732\" height=\"198\" \/><\/p>\n<p>It&#8217;s great when we can extend software like this! I wish more software developers exposed REST API&#8217;s for their users. Great job, Unity!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At my church, we use Unity Intercom to expand our wired intercom system. It is very useful to have users who can be mobile and still stay in communication. We wanted to have the ability for our directors to see who is currently logged into Unity without having to log into the server or be &hellip; <a href=\"https:\/\/techministry.blog\/?p=80\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Getting A List of Active Users in Unity Intercom&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[17,22,29,38,50,51,68,71],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-church","tag-dashboard","tag-javascript","tag-ministry","tag-production","tag-programming","tag-technology","tag-unity"],"_links":{"self":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=80"}],"version-history":[{"count":0,"href":"https:\/\/techministry.blog\/index.php?rest_route=\/wp\/v2\/posts\/80\/revisions"}],"wp:attachment":[{"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techministry.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}