Is there a way to add 'created_by_user_id' when add an activity through api call

when I add an activity by calling the api, I need to record the non_admin user who created this deal, when I directly add the created_by_user_id field to the add an activity api call, got an error as this field is not listed in the fields of post add activity api call field list.
So if I just call the post add activity normally, the created_by_user_id will always be the admin user id.
My point is, I need a way to record the creator as the non_admin_user, not the default admin user, is there something I missed? Thank you for your help.

Add the notes too, is there a way to populate the user_id field when making the api call to add a note which is created by a non-admin user?

Hi,
what kind of authentication are you using? Via API token or OAuth 2?

Thanks Dani, I am using API token. Any suggestions?

The API token is specific per single user. If you add notes with the same API token, you’ll always get the same “created by” id, which is the owner of that specific API token.
So, if you need to track different users, you should have them use their own API token.

If you don’t want each user to copy/paste their own API token somewhere, you can create an unlisted OAuth 2 app. This way your users would install your app, and you could store a separate access_token for each one of them.

I hope that helps :slight_smile:

Thanks mate, I will try that way.

1 Like