<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Last modified by user in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839738#M66796</link>
    <description>&lt;P&gt;We are using a bearer token for the integration and the&amp;nbsp;hs_updated_by_user_id is not being populated by Hubspot&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2023 17:03:00 GMT</pubDate>
    <dc:creator>RChair</dc:creator>
    <dc:date>2023-08-24T17:03:00Z</dc:date>
    <item>
      <title>Last modified by user</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839546#M66779</link>
      <description>&lt;P&gt;I am working on an intergation with the API and need to identify who update the record (Contact and Companies) last. There does not seem to be a proprety to get access to this informaiton. How can this be achieved? Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 13:00:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839546#M66779</guid>
      <dc:creator>RChair</dc:creator>
      <dc:date>2023-08-24T13:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Last modified by user</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839573#M66781</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/620851"&gt;@RChair&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a hidden field (not surfaced in the UI) called "Updated by user ID". It can be programmtically accessed via the API using it's internal name "hs_updated_by_user_id". The field is described as "&lt;EM&gt;the user that last updated this object. This value is automatically set by HubSpot and may not be modified&lt;/EM&gt;."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;"name": "hs_updated_by_user_id",
"label": "Updated by user ID",
"type": "number",
"fieldType": "number",
"description": "The user that last updated this object. This value is automatically set by HubSpot and may not be modified.",
"groupName": "contactinformation",
"options": [],
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"hasUniqueValue": false,
"hidden": true,
"hubspotDefined": true&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The field itself stores the user ID of the HubSpot user who last updated the record. You'd need to make an additional request to the &lt;A href="https://developers.hubspot.com/docs/api/crm/owners" target="_blank" rel="noopener"&gt;Owners API&lt;/A&gt; to pull specific information like users first name, last name and email address. See below requests as an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1) Get the user ID of user who last updated company record&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;GET https://api.hubapi.com/crm/v3/objects/company/8109465573?properties=hs_updated_by_user_id
RESPONSE
{
    "id": "8109465573",
    "properties": {
        "createdate": "2023-07-20T13:25:52.999Z",
        "hs_lastmodifieddate": "2023-08-21T03:30:57.721Z",
        "hs_object_id": "8109465573",
        "hs_updated_by_user_id": "4592290"
    },
    "createdAt": "2023-07-20T13:25:52.999Z",
    "updatedAt": "2023-08-21T03:30:57.721Z",
    "archived": false
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2) Get the details of the user using their user ID&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;GET https://api.hubapi.com/crm/v3/owners/4592290?idProperty=userid
RESPONSE
{
    "id": "1147024111",
    "email": "jackcoldrick-demo@gmail.com",
    "firstName": "Jack",
    "lastName": "Coldrick",
    "userId": 4592290,
    "createdAt": "2023-07-17T14:35:51.734Z",
    "updatedAt": "2023-08-24T08:03:13.263Z",
    "archived": false
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 13:35:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839573#M66781</guid>
      <dc:creator>coldrickjack</dc:creator>
      <dc:date>2023-08-24T13:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Last modified by user</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839738#M66796</link>
      <description>&lt;P&gt;We are using a bearer token for the integration and the&amp;nbsp;hs_updated_by_user_id is not being populated by Hubspot&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 17:03:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839738#M66796</guid>
      <dc:creator>RChair</dc:creator>
      <dc:date>2023-08-24T17:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Last modified by user</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839749#M66797</link>
      <description>&lt;P&gt;Ok, thank you for the additional clarity&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/620851"&gt;@RChair&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on that the only viable option you have is to send over the user data (from your system) and populate custom properties within HubSpot against Contact and Company records as from HubSpots perspective all it see's is an API request being authenticated with a valid bearer token. It has no knowledge of the user(s) behind those requests.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ultimately what it comes down to is that if the change is happening from the HubSpot CRM by a logged in user using "hs_updated_by_user_id" will suffice. Otherwise, if the change is happening external to the HubSpot CRM it is expected that the "hs_updated_by_user_id" property will not populate, or update and you will need to send this metadata with your request and store in custom properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 17:27:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/839749#M66797</guid>
      <dc:creator>coldrickjack</dc:creator>
      <dc:date>2023-08-24T17:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Last modified by user</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/840268#M66831</link>
      <description>&lt;P&gt;I have tried setting a new field through the API that the API last modified the record however the&amp;nbsp;&lt;SPAN&gt;hs_updated_by_user_id property does not get set to null after an update by the API. Any suggestions or workflows for this. Maybe something looking at the source of the change for the last modified date that can be seen from the UI. Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 13:08:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Last-modified-by-user/m-p/840268#M66831</guid>
      <dc:creator>RChair</dc:creator>
      <dc:date>2023-08-25T13:08:08Z</dc:date>
    </item>
  </channel>
</rss>

