Login
Service: Login
- Base URL:
https://api.seirpk.com/auth/login
- Description
The REST Login service is used to generate tokens for Authenticating REST services. See Rest Authentication.
- Request Format
Requests must be sent using HTTP POST method.
- Request Headers
Following headers are required:
API_KEY: The static API key for SEIRdevice_id: The device id of the user's device
- Request Body
Following parameters are required in the request body:
urname: Usernameurpwd: Hashed user passworddevice_model(optional): Human readable device model
- Response Format
- Content-Type:
application/json - Success Response: A 200 OK HTTP status code with the appropriate JSON response body.
- Failure Response: A HTTP status code indicating the fault.
- Server Error Response: A 500 Internal Server Error HTTP status code when a server-side error occurs.
- Response Body Example
{
"user": {
"organizationId": 1,
"deviceType": ZEBRA_PHONE,
"vaccinationCenterId": 4686,
"roleId": 21,
"mappedId": 39623,
"programId": 3,
"username": "tehreem",
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZWhyZWVtIiwiaXNzIjoiWk0vRElHSVRBTC9JUkQiLCJtYXBwZWRfaWQiOjM5NjIzLCJ0b2tlbl90eXBlIjowLCJleHAiOjE3Nzg4NDM0NTEsImlhdCI6MTc3ODc1NzA1MX0.GG1KHzARXUu4jjuppOM1iYrnSU1dOyGVuj2qTSCjTCo",
"refreshToken": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZWhyZWVtIiwiaXNzIjoiWk0vRElHSVRBTC9JUkQiLCJtYXBwZWRfaWQiOjM5NjIzLCJ0b2tlbl90eXBlIjoxLCJleHAiOjE3ODEzNDkwNTEsImlhdCI6MTc3ODc1NzA1MX0.3SIFA6Q8bUTYPS5E-QtvHtemPmhkwabPVCER-_6IHeE"
},
"status": 1
}
See Rest Authentication.