Community
Showing results for 
Search instead for 
Do you mean 
Reply

Add an activity for another user different to the API user

New Member
Posts: 7
Country: New_Zealand

Add an activity for another user different to the API user

How can I use the API to add an activity for a number of different users? Whatever values I set in scheduledFor are ignored, and the value returned when I add the activity is the user ID I'm using to login to the API. I tried including the contact ID of the user in the list of contacts, and also putting the contact ID in the scheduledFor field - none or these work. It seems like the only way to add activities on a different user to the one I'm logged in as is to generate a token for each and every user in the system which of course means knowing all their passwords. Seems like poor design if this is indeed the case.

Employee
Posts: 236
Country: USA

Re: Add an activity for another user different to the API user

Hi, 

 

This is expected functionality from most APIs (and in our SDK today) - you can't circumvent security via API.  In other words, you can't access data that you wouldn't have access to as a user in Act!.

 

You certainly should be able to include contacts on an activity, but you can't impersonate other users. 

 

--Xavier

Nickel Super Contributor
Posts: 352
Country: Canada

Re: Add an activity for another user different to the API user

You can create an activity that is scheduled FOR another user though, or not?  That's something you can do through the desktop / Web UI and you'd expect to be able to do via the API then as well, yeah?

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training
Employee
Posts: 236
Country: USA

Re: Add an activity for another user different to the API user

Yep, if you've been granted delegate permissions you would be able to schedule for.  Albeit not sure we support that current in Web API, you are absolutely correct that it should, since that is a product capability.

New Member
Posts: 7
Country: New_Zealand

Re: Add an activity for another user different to the API user

Indeed. I would expect that if a user has permission to place an activity or anything else for that matter on another user, that this would be possible within the API.

 

What is the process for getting this added as a bug fix/feature?

Employee
Posts: 236
Country: USA

Re: Add an activity for another user different to the API user

Posting here is enough - it's on our backlog to address.

Nickel Super Contributor
Posts: 1,253
Country: USA

Re: Add an activity for another user different to the API user

Any update on this function? I may have to schedule for logged in API user and then reassign it in Act. It might be useful if I could always schedule for a specific person.

 

the video from the 2017 CC Conference was excellent. Gets everyone up the curve faster. Thanks.

Steve McCandlish
Employee
Posts: 38
Country: USA

Re: Add an activity for another user different to the API user

Have you tried the activities organizers endpoints within the API?  You can create an activity that is scheduled FOR another user using the organizers (POST: /api/organizers/{id}/activities) endpoint.

 

let me know if you have any issue?

 

Sample:

Scheduled For User's ID:   f155d4a6-f11f-44d8-afa2-42b090f76429

 

POST: /api/organizers/f155d4a6-f11f-44d8-afa2-42b090f76429/activities

{
  "startTime": "2017-11-09T12:30:00.000Z",
  "endTime": "2017-11-09T13:30:00.000Z",
  "isTimeless": false,
  "isPrivate": false,
  "activityPriorityName": "Low",
  "activityTypeName": "Meeting",
  "subject": "update subject",
  "contacts":
  [
    {
      "id": "f155d4a6-f11f-44d8-afa2-42b090f76429"
    },
    {
      "id": "689d7dc2-156d-42e4-8937-d9eb06a119b5"
    }
  ]
}