{"info":{"_postman_id":"5053cbc4-6e56-46b9-9551-07986e43b7f6","name":"DJoserAuthAPI","description":"<html><head></head><body><h2 id=\"djoserauthapi\">DJoserAuthAPI</h2>\n<p>This collection covers the authentication and user management API built with <strong>Djoser</strong> and <strong>Django REST Framework</strong>. It includes endpoints for the full user lifecycle — from registration to account deletion — as well as seller features and Google OAuth2 social login.</p>\n<h3 id=\"whats-included\">What's included</h3>\n<p><strong>Authentication (JWT)</strong></p>\n<ul>\n<li><p>Register a new account, activate it via email, and log in to receive JWT tokens.</p>\n</li>\n<li><p>Refresh access tokens and log out securely.</p>\n</li>\n</ul>\n<p><strong>Password Management</strong></p>\n<ul>\n<li>Change your password while logged in, or trigger a reset email and confirm the reset.</li>\n</ul>\n<p><strong>User Profile</strong></p>\n<ul>\n<li>Retrieve, update, or delete your own account data.</li>\n</ul>\n<p><strong>Google OAuth2</strong></p>\n<ul>\n<li>Initiate the Google OAuth2 login flow and handle the callback to authenticate via Google.</li>\n</ul>\n<p><strong>Seller Features</strong> <em>(in the</em> <code>_Seller_</code> <em>folder)</em></p>\n<ul>\n<li>Request to become a seller (triggers an email), verify a seller account, and access the seller dashboard.</li>\n</ul>\n<h3 id=\"getting-started\">Getting Started</h3>\n<p>Set the <code>baseURL</code> collection variable to your API's base URL (e.g., <code>http://127.0.0.1:8000/api/v1/auth</code>) before running any requests. Most endpoints require a valid JWT access token — use the <strong>Login</strong> request first and attach the returned token as a Bearer token.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"43960170","collectionId":"5053cbc4-6e56-46b9-9551-07986e43b7f6","publishedId":"2sBXcEmgMa","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-23T13:13:31.000Z"},"item":[{"name":"Seller","item":[{"name":"Become Seller(email sending)","id":"913981ca-c9eb-4126-ab9b-727882c1bbed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"store_name","value":"","type":"text","uuid":"5d200559-3c1c-4c24-9b3e-860a5ceed425"},{"key":"business_email","value":"","type":"text","uuid":"c5ab1308-1764-4fde-a816-12ffc2f18f8d"}]},"url":"/seller/","urlObject":{"path":["seller",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"913981ca-c9eb-4126-ab9b-727882c1bbed"},{"name":"Verify seller","id":"b16af156-8a10-47c2-945b-9d83b907fb3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"/verify-seller/<token>/","urlObject":{"path":["verify-seller","<token>",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"b16af156-8a10-47c2-945b-9d83b907fb3d"},{"name":"Seller Dashboard","id":"d0ef7ef4-4a56-419f-b862-2c51009fb22d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"/sellerDashboard/","urlObject":{"path":["sellerDashboard",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"d0ef7ef4-4a56-419f-b862-2c51009fb22d"}],"id":"7bec953a-05aa-43c8-bde6-322714475ee0","description":"<h2 id=\"seller\">Seller</h2>\n<p>This folder contains endpoints for managing the seller onboarding flow within the DJoserAuthAPI.</p>\n<h3 id=\"endpoints\">Endpoints</h3>\n<ul>\n<li><p><strong>Become Seller</strong> – Submits a seller registration request and triggers a verification email to the provided address.</p>\n</li>\n<li><p><strong>Verify Seller</strong> – Confirms the seller's identity using a unique token sent via email. Complete this step to activate seller privileges.</p>\n</li>\n<li><p><strong>Seller Dashboard</strong> – Retrieves the authenticated seller's dashboard data.</p>\n</li>\n</ul>\n<h3 id=\"authentication\">Authentication</h3>\n<p>Requests in this folder require a valid authenticated user session. Ensure your <code></code> environment variable is set before running these requests.</p>\n<h3 id=\"workflow\">Workflow</h3>\n<ol>\n<li><p>Call <strong>Become Seller</strong> with the required details to initiate the process.</p>\n</li>\n<li><p>Check your email and use the verification link/token with <strong>Verify Seller</strong>.</p>\n</li>\n<li><p>Once verified, access your <strong>Seller Dashboard</strong>.</p>\n</li>\n</ol>\n","_postman_id":"7bec953a-05aa-43c8-bde6-322714475ee0"},{"name":"Google-oauth","item":[{"name":"Google Login","id":"084f6663-7bbd-4e00-9ad0-47a87c9a81af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/o/google-oauth2/?redirect_uri=http://127.0.0.1:8000/api/v1/auth/o/google-oauth2/","urlObject":{"path":["o","google-oauth2",""],"host":[""],"query":[{"key":"redirect_uri","value":"http://127.0.0.1:8000/api/v1/auth/o/google-oauth2/"}],"variable":[]}},"response":[],"_postman_id":"084f6663-7bbd-4e00-9ad0-47a87c9a81af"},{"name":"Authorize Google Login","id":"fc76e579-9c98-4e57-9a04-799c7780738f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"/o/google-oauth2/?state= &code=","urlObject":{"path":["o","google-oauth2",""],"host":[""],"query":[{"key":"state","value":" "},{"key":"code","value":""}],"variable":[]}},"response":[],"_postman_id":"fc76e579-9c98-4e57-9a04-799c7780738f"}],"id":"b4321ca6-fcf7-4f51-8abf-03aa65e66f05","description":"<h2 id=\"google-oauth\">Google OAuth</h2>\n<p>This folder contains endpoints for authenticating users via <strong>Google OAuth 2.0</strong> using the Djoser social auth integration.</p>\n<h3 id=\"endpoints\">Endpoints</h3>\n<ul>\n<li><p><strong>Initiate Google OAuth</strong> – Redirects the user to Google's authentication page. Provide a <code>redirect_uri</code> pointing to your callback URL to begin the OAuth flow.</p>\n</li>\n<li><p><strong>Complete Google OAuth</strong> – Handles the callback from Google after the user grants permission. Exchanges the authorization <code>code</code> and <code>state</code> for an access token to authenticate the user in the system.</p>\n</li>\n</ul>\n<h3 id=\"authentication\">Authentication</h3>\n<p>No prior authentication is required to initiate the flow. The <code>code</code> and <code>state</code> parameters in the callback request are provided automatically by Google after the user logs in.</p>\n<h3 id=\"workflow\">Workflow</h3>\n<ol>\n<li><p>Call the <strong>Initiate Google OAuth</strong> endpoint with your <code>redirect_uri</code> to get the Google login URL.</p>\n</li>\n<li><p>Redirect the user to that URL so they can log in with their Google account.</p>\n</li>\n<li><p>Google will redirect back to your <code>redirect_uri</code> with <code>code</code> and <code>state</code> query parameters.</p>\n</li>\n<li><p>Call the <strong>Complete Google OAuth</strong> endpoint with those parameters to receive an authentication token.</p>\n</li>\n</ol>\n<h3 id=\"environment-setup\">Environment Setup</h3>\n<p>Ensure <code></code> is set in your active environment before running these requests.</p>\n","_postman_id":"b4321ca6-fcf7-4f51-8abf-03aa65e66f05"},{"name":"Registration","event":[{"listen":"test","script":{"id":"03ab7017-8d98-49a9-a8a8-13e413911062","exec":[""],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"prerequest","script":{"id":"42e7bd78-3de2-4956-a25c-ea328a45ce9e","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"1fc94288-481c-4015-8195-9dd27b54a4cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"","type":"text","uuid":"5d077ef6-4a35-4a68-bdb9-c23b70c7d274","description":"<p>Add Unique Username</p>\n"},{"key":"email","value":"","type":"text","uuid":"8f63994a-7ea3-4091-a0f5-d54eb222d5c9","description":"<p>Add Unique and verified Email ( only Gmail is approved)</p>\n"},{"key":"password","value":"","type":"text","uuid":"205bce75-bd63-4a3d-8304-ac93fedd6ce2","description":"<p>Add unique and strong password(atleast 8 In length)</p>\n"},{"key":"re_password","value":"","type":"text","uuid":"2ec23331-9f24-4392-99c8-79fcf2f257b3","description":"<p>Retype Same password from above</p>\n"}]},"url":"/users/","description":"<p>Registers a new user account using the Djoser authentication framework for Django.</p>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/users/</code><br /><strong>Body Type:</strong> <code>multipart/form-data</code></p>\n<h3 id=\"required-fields\">Required Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>username</code></td>\n<td>The desired username for the new account</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>The user's email address</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>The account password</td>\n</tr>\n<tr>\n<td><code>re_password</code></td>\n<td>Password confirmation (must match <code>password</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"notes\">Notes</h3>\n<ul>\n<li>Both <code>password</code> and <code>re_password</code> must match for successful registration.</li>\n<li>On success, the API returns the newly created user's details with a <code>201 Created</code> response.</li>\n<li>Passwords must meet the configured Django password validation requirements.</li>\n</ul>\n","urlObject":{"path":["users",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"1fc94288-481c-4015-8195-9dd27b54a4cb"},{"name":"Account Activation","id":"7276677d-c42b-4ed2-8940-829f402eef32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"uid","value":"","type":"text","uuid":"04767fa0-9bef-4bdd-9a0d-ae5aff811b33"},{"key":"token","value":"","type":"text","uuid":"6d294332-388f-4bc4-a9b9-b2bbc9441b3b"}]},"url":"/users/activation/","urlObject":{"path":["users","activation",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"7276677d-c42b-4ed2-8940-829f402eef32"},{"name":"Login","id":"aa95689a-5997-4676-956e-652bd227f40a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"","type":"text","uuid":"081f508c-0d24-4a0a-b3fd-83c985e9e186","description":"<p>email you registered</p>\n"},{"key":"password","value":"","type":"text","uuid":"901f3ee6-8fea-47c4-8eee-1ad0b184a742","description":"<p>password</p>\n"}]},"url":"/jwt/create/","urlObject":{"path":["jwt","create",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"aa95689a-5997-4676-956e-652bd227f40a"},{"name":"Logout","id":"78ac542b-ab9e-4100-a853-6a092d943b0c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"refresh","value":"","type":"text","uuid":"1d12e4f6-672b-456f-a85c-b6f15e700420","description":""}]},"url":"/logout/","description":"<p>Need Header(Authorization) and body (refresh)</p>\n","urlObject":{"path":["logout",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"78ac542b-ab9e-4100-a853-6a092d943b0c"},{"name":"New Access Token (Refresh)","id":"08501115-69be-4370-a7ca-b0c587c2723f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"refresh","value":"","type":"text","uuid":"275fde07-1e2e-4548-b9a3-b6f9054850e6","description":""}]},"url":"/jwt/refresh/","urlObject":{"path":["jwt","refresh",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"08501115-69be-4370-a7ca-b0c587c2723f"},{"name":"User Data","id":"07696095-4574-4b46-bc2a-1a7dccac92ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"/users/me/","description":"<p>Need Header(Authorization)</p>\n","urlObject":{"path":["users","me",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"07696095-4574-4b46-bc2a-1a7dccac92ca"},{"name":"Chanage User Data","id":"1249ebfe-ed2f-4b61-b2bf-6e04f7db6ccc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":false},"method":"PUT","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"username ","value":"LamsalSushank2","type":"text","uuid":"b893af02-c064-4ec4-a27e-528cdc634216"},{"key":"email","value":"lamsal@gmail.com","type":"text","uuid":"11b25aee-4847-413f-be2d-c1e3a55df53c","disabled":true}]},"url":"/users/me/","description":"<p>Need Header(Authorization) and body(what to nchange for eg, username)</p>\n","urlObject":{"path":["users","me",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"1249ebfe-ed2f-4b61-b2bf-6e04f7db6ccc"},{"name":"Change Password after login","id":"23b5d805-eaa3-4007-bd98-0be916fdae97","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"new_password","value":"","type":"text","uuid":"cb901238-e1e3-4760-aa08-15ad922c2a7f"},{"key":"re_new_password","value":"","type":"text","uuid":"6e0a9c66-a7a4-4ae4-974e-b2787369b157"},{"key":"current_password","value":"","type":"text","uuid":"064764f0-73c4-4768-b017-5c4a3b3322e7"}]},"url":"/users/set_password/","description":"<p>Need Header(Authorization) and body</p>\n","urlObject":{"path":["users","set_password",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"23b5d805-eaa3-4007-bd98-0be916fdae97"},{"name":"Reset Password Email","id":"ba4e0378-6fc8-4a99-99b3-4975e98f3a18","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"email","value":"","type":"text","uuid":"215e0ad7-0f4f-4104-bb3f-692169c9514d","description":"<p>email (registered) </p>\n"}]},"url":"/users/reset_password/","urlObject":{"path":["users","reset_password",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"ba4e0378-6fc8-4a99-99b3-4975e98f3a18"},{"name":"Reset Password Confirmation","id":"60495f4f-f9cb-4dda-b62c-cc0002648b79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"uid","value":"","type":"text","uuid":"e9aec57a-8e17-4bd3-90fa-ddfaab2cd5ea"},{"key":"token","value":"","type":"text","uuid":"186a23d1-dfdb-48f7-a8c7-b469dbf53a8e"},{"key":"new_password","value":"","type":"text","uuid":"b6e41e4a-8480-492d-9eb5-7db86d3ddf5d"},{"key":"re_new_password","value":"","type":"text","uuid":"31650c8d-0904-4385-9a18-b95903682e7e"}]},"url":"/users/reset_password_confirm/","urlObject":{"path":["users","reset_password_confirm",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"60495f4f-f9cb-4dda-b62c-cc0002648b79"},{"name":"Delete Account","id":"41f142a4-b7e2-45a8-9ab5-6f3993dd0284","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"","description":"<p>JWT </p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"current_password","value":"","type":"text","uuid":"50a5c527-099f-44a6-8c79-31168e5617ef","description":"<p>password required</p>\n"}]},"url":"/users/me/","description":"<p>Need Header(Authorization) and body</p>\n","urlObject":{"path":["users","me",""],"host":[""],"query":[],"variable":[]}},"response":[],"_postman_id":"41f142a4-b7e2-45a8-9ab5-6f3993dd0284"}],"variable":[{"id":"e6d93c5d-a130-469a-9688-21bbcf3e1c2b","key":"baseURL","value":"","type":"default"}]}