This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Authentication

Protegrity API Playground uses an API Key and a JWT token for request authorization. You will receive your unique API Key as part of the registration process. This section documents how to obtain a JWT token and change your password.

Note: Accounts that were not activated within 7 days will be deleted and the users will be required to re-register.

Watch the video below for step-by-step instructions on registering with Protegrity API Playground:

1 - Login

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/auth/login

ATTRIBUTES:

email (required) Your registered email address.

password (required) Your password.

DESCRIPTION:

Obtain a JWT token for request authentication. Use your email and password to log in. The received JWT token is valid for 24 hours. Run the endpoint again to request a new token.

SAMPLE REQUEST

cURL --location 'https://api.playground.protegrity.com/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "<USER_EMAIL>",
    "password": "<USER_PASSWORD>"
}'
  
  
  

SAMPLE RESPONSE


{
  "statusCode": 201,
  "message": "Login successful",
  "jwt_token": "eyJraWQiOiI4T2pkOXlCWnlhMGYyVnZxRmRTblowN1ZnUEp6SHpTWFY5XC9xWXhvVTJWMD0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI4NDU4ZDQ2OC02MDIxLTcwMzktMTYzZi0zZGU4ZDZjMGE1ODgiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29t"
}

2 - Change Password

Note: Alternatively, you can use the Change Password Form to change your password.

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/auth/change-password

DESCRIPTION:

Change your password. This is a recommended action for all newly registered accounts.

Password requirements: Your new password should be at least 8 characters long, include a special character, a lowercase letter, an uppercase letter, and a number.

ATTRIBUTES:

email (required) The email address you used to register with the Playground.

old_password (required) Your old password. For new accounts, this is the password you received from us during registration.

new_password (required) Your new password.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/auth/change-password' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "<USER_EMAIL>",
  "old_password": "<OLD_PASSWORD>",
  "new_password": "<NEW_PASSWORD>"
}'
  
  
  

SAMPLE RESPONSE


{
  "statusCode": 201,
  "message": "Password change successful"
}