Authentication Guide

All Nirvahak API requests must be authenticated using a Bearer Token. This ensures that only authorized users or systems can access protected endpoints.

How Authentication Works:-

StepActionEndpointDescription
1Login with credentialsPOST /user/loginSends username and password to receive a token
2
Include Authorization: Bearer YOUR_TOKEN In every protected request

All endpoints

Include Authorization: Bearer YOUR_TOKEN in every protected request

Success Response:-


{
  "status": "success",
  "token": "eyJhbGciOiJIUzI1NiIsInR5..."
}

Body:-


curl -X POST https://api.nirvahak.com/v1/user/login \
  -H "Content-Type: application/json" \
  -d '{
    "username": "vasanthi",
    "password": "example123"
}'

Next

Leave a Reply

Your email address will not be published. Required fields are marked *