This blog demonstrates how to use the API in order to invite a list of usernames to an event. It is recommended testing with one user initially before using more than one in your API call.

  Note: Assistance with the API is out of the scope of Jive Support.

 

Step 1: Grab the ID of the event. To do so, look at the URL and note down the number at the end.

eventid.jpg

 

Step 2: You will get a new URL ready to help build your new API call.

yourinstance.com = Your Jive URL

eventid = The eventid from the end of the event URL

 

     https://yourinstance.com/api/core/v3/contents?filter=entityDescriptor(96891546,eventID)

 

     For example:

    https://support-mike-7-0-2-1.support.jiveint.com/api/core/v3/contents?filter=entityDescriptor(96891546,1004)

 

Step 3: After entering the URL from step 2 into the browser, JSON is returned. From here, look for "invitations" to find the reference URL.

throw 'allowIllegalResourceCall is false.';

{

  "itemsPerPage" : 25,

  "list" : [ {

  "id" : "1004",

  "resources" : {

  "invitations" : {

  "allowed" : [ "POST", "GET" ],

  "ref" : "https://support-mike-7-0-2-1.support.jiveint.com/api/core/ext/event-type-plugin/v3/invites/event/1064"

  },

  "yesAttendees" : {

  "allowed" : [ "GET" ],

  "ref" : "https://support-mike-7-0-2-1.support.jiveint.com/api/core/ext/event-type-plugin/v3/rsvp/1064/attendees/yes"

 

  Screenshot below:

    eventAPI2.jpg

 

Step 4: Using curl, we will build our API command with values.

user = User who has permission to invite others to the event.

password = The password for the user who has permission to invite others.

YOUR_INVITE_TEXT = The message you would like in the invite to the users.

user1NamesGoesHere = The usernames you would like to invite

eventInviteID = The id number you found from the Step 3.


$ curl -v -u user:password --header 'Content-Type: application/json;charset=UTF-8;' -X POST -d '{"body":"YOUR_INVITE_TEXT","invitees":[user1NamesGoesHere, user2NamesGoesHere]}' "https//support-mike-7-0-2-1.support.jiveint.com/api/core/ext/event-type-plugin/v3/invites/event/eventInviteID"

 

Example API command:

$ curl -v -u admin:X2Ixxxxxxxx1 --header 'Content-Type: application/json;charset=UTF-8;' -X POST -d '{"body":"Join my event!!","invitees":[username1, username2, username3]}' "https://support-mike-7-0-2-1.support.jiveint.com/api/core/ext/event-type-plugin/v3/invites/event/1064"

 

From here, you should see the terminal returning json which indicates the API call was successful.

 

Bonus note:

If you'd like, you can find all events using the "type" filter: https://community.jivesoftware.com/api/core/v3/contents?type=(event)&fields=-resources,-author,-content