Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To call the API so that it performs the operations or returns the data requested by your application, you need to make a POST request to the appropriate endpoint. The below example demonstrates how to reset a person's password.

Endpoint


Code Block
languagexml
https://<YourEmpowerIDServer>/api/services/v1/password/reset


Headers

KeyValue
X-EmpowerID-API-KeyThe API key for the OAuth application you registered in EmpowerID.
AuthorizationThe OAuth token you received from EmpowerID.
Content-Typeapplication/json



Request Data

Request data is sent to the API in JSON format. The data in the below request represents the minimum key/value pairs required for editing an EmpowerID Person.


Code Block
languagetext
{"Password":"Newp@$$w0rd","PersonID":184184,"UnlockAccounts":false,"MustChangePasswordOnNextLogin":false}



ElementDescriptionTypeRequired / OptionalNote
PasswordNew password StringRequired
PersonIDID of the target personIntegerRequired


Code Examples

cURL

Info

Be sure to use double quotes unless you are making the request from a non-Windows OS.

Request

Code Block
languagetext
curl --location --request POST 'https://Your_Web_Server/api/services/v1/password/reset' \
--header 'Content-Type: application/json' \
--data-raw '{
  "Password": "<string>",  
  "PersonID": "<integer>"
}'

C#

Code Block
languagec#
var client = new RestClient("https://Your_Web_Server/api/services/v1/password/reset");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"Password\": \"<string>\",\n  \"PersonID\": \"<integer>\"\n}",  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Response

If the request is successful, you should receive a JSON response that looks similar to the following:


Code Block
languagetext
{
    "Success": true,
    "Message": "EmpowerID\\<Person Login Value> Password reset successfully",
    "Exception": null
}



Div
stylefloat: left; position: fixed; padding: 5px;
idtoc
classtopicTOC


Div
stylefont-size: 1rem; margin-bottom: -45px; margin-left: 40px;text-transform: uppercase;

In this article



Table of Contents
maxLevel2
stylenone