Versions Compared

Key

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

To call utilize the API so that it performs the for performing operations or returns the retrieving data requested required by your application, you need to make initiate a POST request to the appropriate relevant endpoint.   The below following example demonstrates illustrates how to make an API call to reset a person's password.:

Endpoint

Code Block
languagexml
https://<YourEmpowerIDServer>/api/services/v1/passwordPasswordPolicy/resetResetPassword

Headers

Key

Value

X-EmpowerID-API-Key

The API key for the OAuth application you registered in EmpowerID.

Authorization

The OAuth token

you received from EmpowerID

of the person making the API call.

Content-Type

application/json

Request Data

Request data is sent to the API in JSON format. The sample data in the below request represents the minimum key/value pairs required for editing an EmpowerID Personresetting a person’s password.

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

ElementDescription

Request Parameter

Type

Required / Optional

NoteString

Description

PasswordNew password 

PersonID

Integer

Required

PersonID

Person ID of the target person

IntegerRequired

Password

String

Required

New password

UnlockAccounts

Boolean

Required

Specified whether to unlock the person’s accounts

MustChangePasswordOnNextLogin

Boolean

Required

Specifies whether the person must change their password the next time they log in to the system


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/passwordPasswordPolicy/resetResetPassword' \
--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/passwordPasswordPolicy/resetResetPassword");
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
}


topicTOCmaxLevel
Div
class
stylefloat:left; position:fixed; padding: 5px;
idtocarticleNav

IN THIS ARTICLE

Table of Contents
div
Table of Contents
maxLevel
stylefont-size: 1rem; margin-bottom: -45px; margin-left: 40px;text-transform: uppercase;

In this article

3
minLevel2
stylenone
printablefalse