{"info":{"_postman_id":"9bfc5ccc-87f2-428c-a468-890280da093b","name":"swadSetu","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"54465064","collectionId":"9bfc5ccc-87f2-428c-a468-890280da093b","publishedId":"2sBXqKofTg","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-05-02T18:15:48.000Z"},"item":[{"name":"login","id":"9f8f42ce-2744-46c6-9a2f-25743e7ea0bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:5001/api/users/login","urlObject":{"protocol":"http","port":"5001","path":["api","users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9f8f42ce-2744-46c6-9a2f-25743e7ea0bd"},{"name":"profile","id":"cf123642-0416-4bcf-827f-071fb549b2b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5001/api/users/profile","description":"<h3 id=\"api-endpoint-get-user-profile\">API Endpoint: Get User Profile</h3>\n<p><strong>Method:</strong> GET<br /><strong>URL:</strong> <code>http://localhost:5001/api/users/profile</code></p>\n<h4 id=\"description\">Description</h4>\n<p>This endpoint retrieves the profile information of the currently authenticated user. It is essential for applications that require user-specific data to be displayed or utilized.</p>\n<h4 id=\"request-format\">Request Format</h4>\n<ul>\n<li><p><strong>Headers:</strong></p>\n<ul>\n<li><code>Authorization</code>: This header must be included and should contain a valid token to authenticate the user. Without proper authentication, a <code>401 Unauthorized</code> status will be returned.</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"expected-response-format\">Expected Response Format</h4>\n<ul>\n<li><p><strong>Status Codes:</strong></p>\n<ul>\n<li><p><code>200 OK</code>: Indicates that the request was successful and the user profile data is returned.</p>\n</li>\n<li><p><code>401 Unauthorized</code>: Indicates that the request is missing valid authentication credentials.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Response Body:</strong></p>\n<ul>\n<li><p>Content-Type: <code>application/json</code></p>\n</li>\n<li><p>The response body will contain JSON data with user profile details if the request is successful. In case of an error, the response will include a message indicating the issue.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"example-response\">Example Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"\",\n  \"stack\": \"\"\n}\n\n</code></pre>\n<p>This example shows the structure of the response for an unauthorized request. A successful response will include user-specific data.</p>\n<p>Ensure to provide the necessary authentication token in the request header to access this endpoint successfully.</p>\n","urlObject":{"protocol":"http","port":"5001","path":["api","users","profile"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"12537568-baab-42c0-925d-f51200692785","name":"profile","originalRequest":{"method":"GET","header":[],"url":"http://localhost:5001/api/users/profile"},"status":"Unauthorized","code":401,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1443"},{"key":"ETag","value":"W/\"5a3-uEjM/vwyR2ABvk3IlgQJ5eCPRAw\""},{"key":"Date","value":"Sat, 02 May 2026 18:14:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Not authorized, no token\",\n    \"stack\": \"Error: Not authorized, no token\\n    at protect (file:///C:/Users/Sumit%20kumar/OneDrive/Desktop/swadSetu/backend/middleware/authMiddleware.js:27:10)\\n    at Layer.handle [as handle_request] (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\layer.js:95:5)\\n    at next (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\route.js:149:13)\\n    at Route.dispatch (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\route.js:119:3)\\n    at Layer.handle [as handle_request] (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\layer.js:95:5)\\n    at C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:284:15\\n    at Function.process_params (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:346:12)\\n    at next (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:280:10)\\n    at Function.handle (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:175:3)\\n    at router (C:\\\\Users\\\\Sumit kumar\\\\OneDrive\\\\Desktop\\\\swadSetu\\\\backend\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:47:12)\"\n}"}],"_postman_id":"cf123642-0416-4bcf-827f-071fb549b2b0"}]}