Documentation

/impersonate [POST]

ThoughtFarmer REST API Method: /impersonate

Will allow administrators to impersonate another user for API calls. It requires authentication of an admin username and password and a userID of the requested user for impersonation. If successful, it returns a token for the requested user that can be passed into the other API calls to represent that user. 
 
URL:
http://yourserver.com/api/impersonate

Response Formats:
string

HTTP Method(s):
POST
 
Requires Authentication:
false, user making call must be a ThoughtFarmer administrator

Parameters:

Parameter Type Description 
username string Required. The username of the user to authenticate
password string Required. The password of the user to authenticate
impersonateUserId int Required. The id of the requested user for impersonation.
applicationId string Required. A valid application id that allows the client to make calls against the API
Response Status Codes:
200 - Authentication successful
401 - Error validating user or application id
403 - Insufficient permissions to impersonate user
404 - Invalid impersonateUserId
 
Example request
POST http://yourserver.com/api/impersonate
  Content-Type: application/json
{
    "username": "user",
    "password": "password",
    "applicationId": "UIBOLTGPSUIFBQJLFZNJLFOPXZPVBSFEPOF",
    "impersonateUserId": 1234
}
5349D7651EF7BC59AA4A27AEF4C3853A59ED5AF1D082A8BA0BE13397E5010549E2DD633536F580B04A4F84771FBD19F190755FE804D18CA2F15DBFD4A4E999326F2F72449622A2A0ED54A32BA3DC8660118569E061535F69F086CC30C4A32A8253B01713CE046CB145F533E1E1042D3EE852A0F9020D54B8D92EE2D719960F65DB6506232C93B57412A4167CC388637B