3 Replies Latest reply on Apr 19, 2018 4:38 AM by john_reynolds

    How to autofollow someone in inbox Through API

    rajika

      Hi Team,

       

      Is there any way to autofollow someone in inbox through API or any other alternative way to get this done.

       

      Please Assist.

       

      Regards,

      Rajika

        • Re: How to autofollow someone in inbox Through API
          john_reynolds

          Hi Rajika,

           

          As I understand your question, you want to autofollow someone in this way:

          • You have an existing profile of someone to follow, for example the Company CEO or VP of Communications
          • When a new user joins, you want the new user to automatically follow the Company CEO or VP of Communications

           

          There is no out of the box function for this; however, you can build this with REST API & Webhooks - Developer Resources

          1. Create a webhook that takes action when a user is created
          2. Use the REST api to create the following relationship from the new user to the user you want them to follow

           

          Jive REST API provides these methods

           

          Jive REST API v3.14 → Person service

           

          Update Following

          PUT /people/{personID}/@following/{followedPersonID}

          Create a following relationship between the specified user and the specified followed user.

           

          Create Following In

          POST /people/{personID}/followingIn

          Replace the list of Streams in which the requesting user is following this person.

           

          Hope that helps!

            • Re: How to autofollow someone in inbox Through API
              rajika

              John Reynolds

               

               

              We are trying to make autofollow user in a particular community (space or group).

               

              could you please suggest you what could be the best possible solution for this.

               

              Please Assist.

               

              Regards,

              Rajika

                • Re: How to autofollow someone in inbox Through API
                  john_reynolds

                  Hi Rajika,

                   

                  Ok, you want a user to automatically follow spaces or groups when they are created. As you know, the permissions for each are as follows:

                  • Spaces - permissions managed with permission groups
                  • Groups - permissions managed with membership (joining)

                   

                  There are many ways to do this:

                  1. Configure News Homepage
                  2. AD / SAML Single Sign On
                  3. Webhooks
                  4. Custom Application

                   

                  Configure News page

                  Jive maintained an AutoFollow plugin on hosted, but this functionality was replaced by the News page, where you can set up activity streams based on user attributes. More documentation is at Core Help . This would not require any custom code.

                   

                  AD / SAML Single Sign-On

                  Another common way to autofollow spaces is to have this established with Active Directory integration or SAML Single Sign On. With each, the integration can pass user groups to Jive and Jive will manage the addition/subtraction to permissions groups.  There isn't a direct implementation of this for groups, but see below.

                   

                  Webhooks

                  For groups, you can still build this with REST API & Webhooks - Developer Resources

                  1. Create a webhook that takes action when a user is created
                  2. Use the REST api to create/update/destroy membership to a social group with the /members service - Jive REST API v3.14 → Member service

                   

                  For spaces,

                  1. Create a webhook that takes action when a user is created
                  2. Use the REST api to create/update/destroy membership to a security group (aka user group, permission group) with the /securityGroups service - Jive REST API v3.14 → SecurityGroup service

                   

                  Custom Application

                  Lastly, you can use the same approach as webhooks above and develop a standalone application (either web application or command-line) that uses the API (see Webhooks section) to create these relationships from your network. You can use the REST API in any Java, Groovy, Ruby or other language

                   

                  Hope that helps!

                  2 people found this helpful