cancel
Showing results for 
Search instead for 
Did you mean: 

precious inviteTicket

cszamudio
Champ on-the-rise
Champ on-the-rise
Hi,
I've been struggling with this for a bit now, so I thought I'd ask for help. I am attempting to use the Invite web scripts to integrate the ability for users to accept or reject invitations from within my application.  I can successfully retrieve the invitations for a user using the /alfresco/service/api/invites?inviteeUserName= service, but the JSON object returned does not include the inviteTicket as required for the PUT to accept the invitation.

The JSON object returns the:

"inviteId":
"inviter":
"invitee":
"site":
"role":
"sentInviteDate":

but no "inviteTicket".  Anyone have experience extracting this precious piece of information?   Thanks in advance.
6 REPLIES 6

mrogers
Star Contributor
Star Contributor
The "ticket" is on the invitation email only.

It's a security feature that it's not available by any other interface.

And there are already scripts to accept or reject the invitation.

cszamudio
Champ on-the-rise
Champ on-the-rise
Thank you for your prompt response. Just a clarification for future reference.  What do you mean "there are already scripts to accept or reject the invitation"?  The scripts that are described in the REST reference documentation (3.0) require the inviteTicket. If the ticket only appears in the email message response, then accepting or rejecting invitations is not something that can be done in an application.(although the Share we user interface has the ability to reject or accept as part of the Tasks widget).  Are there any other scripts that I can use in an application to accept/reject an invitation?  Sorry for being little dense here…

Carlos S. Zamudio

mrogers
Star Contributor
Star Contributor
Currently the invitation process is based upon email and you will need the ticket which appears on that email to accept. 

Perhaps if your requirement is less "invitation" and more "programatically add users to a share site" you could to use SiteService.setMembership() instead?    Or alternatively just add a single group membership and add users to that group.

cszamudio
Champ on-the-rise
Champ on-the-rise
Thanks so much. I get it.  I'm developing a rich client application that interfaces with Alfresco. I've been able to use the Web Services for most of my work, but now I'd like to integrate with some Alfresco features that appear to only be accessible from the REST/Web Scripts API.  Keeping track and organizing  invitation requests and other workflow tasks that require user action is something that I'm paying attention to now.

(How do you imagine the Share Dashboard provides the ability for a user to accept/reject an Invitation from the Tasks widget? Does it do as you suggest and interface with Site Services?)

mrogers
Star Contributor
Star Contributor
It's a while since I worked on the invitation service but the the thing is that if you have access to the tasks dashlet then you already have an active alfresco account and are already authenticated, therefore you don't need the ticket.     The invite ticket stuff is mainly for a user who does not yet have an "alfresco password".   So the ticket is a temporary authentication token.

cszamudio
Champ on-the-rise
Champ on-the-rise
Thanks. I promise I won't beat this to death, but it would seem then that there must be a way to run some REST/Web Script that doesn't require an inviteTicket since I can provide the required authentication via the HTTP client in my application (this works for the other REST/Web Scripts that I use - for example, I can retrieve all of the workflow tasks assigned to a user using this method).  Anyway, thanks for the hints. If I discover a work-around I'll post it here for others to review in case it's useful. Cheers.