File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,19 @@ public HubSpotContactApi(IHubSpotClient client)
5656 var data = _client . Execute < T > ( path , Method . GET ) ;
5757 return data ;
5858 }
59+
60+ /// <summary>
61+ /// Gets a contact by their user token
62+ /// </summary>
63+ /// <param name="userToken">User token to search for from hubspotutk cookie</param>
64+ /// <typeparam name="T">Implementation of ContactHubSpotModel</typeparam>
65+ /// <returns>The contact entity</returns>
66+ public T GetByUserToken < T > ( string userToken ) where T : ContactHubSpotModel , new ( )
67+ {
68+ var path = $ "{ new T ( ) . RouteBasePath } /contact/utk/{ userToken } /profile";
69+ var data = _client . Execute < T > ( path , Method . GET ) ;
70+ return data ;
71+ }
5972
6073 /// <summary>
6174 /// List all available contacts
@@ -214,4 +227,4 @@ public void Delete(long contactId)
214227 return data ;
215228 }
216229 }
217- }
230+ }
You can’t perform that action at this time.
0 commit comments