{"info":{"_postman_id":"1b43e5b7-0c9f-4b82-a474-d7609f897806","name":"Rest API Addon","description":"<html><head></head><body><p>This addon for <a href=\"https://digits.unitedover.com/\">Digits</a> provides the functionality of login/signup using mobile phone numbers to your WordPress site using REST API.</p>\n<p><strong>Authentication Process:</strong></p>\n<p>The API authentication is token-based, ensuring enhanced security compared to conventional methods. By eliminating the need for user credentials, access can be restricted at any time.</p>\n<p><strong>Access Token Usage:</strong></p>\n<p>An Access Token serves as a substitute for user credentials in subsequent requests. To authenticate with an access token, include the following header in your request:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer access_token\n\n</code></pre><p><em><strong>Note:</strong></em> <strong>If a user changes their password, you will need to re-request the access token.</strong></p>\n<p><strong>Access Token Validity:</strong></p>\n<p>Access tokens expire after 14 days of inactivity. To renew an expired token, you must request a new one. The expiry duration can be adjusted from the REST API addon settings.</p>\n<p>Expired tokens result in a 401 HTTP error code, along with the following error message:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": false,\n  \"data\": {\n    \"error\": \"token_expired\",\n    \"message\": \"Your session has expired. Please login again\"\n  }\n}\n\n</code></pre>\n<p><strong>Error Handling:</strong></p>\n<p>If authentication fails, a 401 HTTP error code is returned with the following error message:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": false,\n  \"data\": {\n    \"error\": \"invalid_token\",\n    \"message\": \"Invalid Token\"\n  }\n}\n\n</code></pre>\n<p><strong>Configuration:</strong></p>\n<p>For proper authentication, add the following to your <code>.htaccess</code> file:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">RewriteEngine On\nRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n\n</code></pre>\n<p>Additionally, include the following in your <code>httpd.conf</code> file:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>SetEnvIf Authorization \"(.*)\" HTTP_AUTHORIZATION=$1\n\n</code></pre><p><strong>Note: Requests should be sent as POST parameters in the request body.</strong></p>\n<p><strong>Firebase Gateway Integration:</strong></p>\n<p>To utilize Firebase Gateway for OTP verification, ensure you have incorporated their native libraries. Token verification can be performed at <a href=\"https://jwt.io/\">https://jwt.io/</a>.</p>\n<p>For further details, refer to: <a href=\"https://firebase.google.com/docs/auth/admin/verify-id-tokens#retrieve_id_tokens_on_clients\">Firebase Documentation</a></p>\n<p>This information ensures a streamlined authentication process for your API integration.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"37319001","collectionId":"1b43e5b7-0c9f-4b82-a474-d7609f897806","publishedId":"2sA3kbhK2q","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-07-31T05:11:39.000Z"},"item":[{"name":"Login","id":"37089797-e7a4-41b0-b840-4f542f2bf16b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"user","value":"","description":"<p>User’s Phone Number / Email / Username (not needed with Account Kit)</p>\n","type":"text"},{"key":"countrycode","value":"","description":"<p>Country code of Phone (with + symbol) (only needed if value of “user” is phone number)</p>\n","type":"text"},{"key":"otp","value":"","description":"<p>One Time Passcode</p>\n","type":"text"},{"key":"password","value":"","description":"<p>User’s Password (not required if using OTP)</p>\n","type":"text"},{"key":"ftoken","value":"","description":"<p>Firebase ID Token if using Firebase Gateway</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/login_user","description":"<p>This endpoint facilitates user login within the WordPress environment. Users can log in by providing the necessary information through this API endpoint.</p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/login_user</code></p>\n","urlObject":{"path":["wp-json","digits","v1","login_user"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"1ee1131c-8d65-4357-bf89-98f638950b76","name":"example","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"user","value":"{{user}}","description":"User’s Phone Number / Email / Username (not needed with Account Kit)","type":"text"},{"key":"countrycode","value":"{{country code}}","description":"Country code of Phone (with + symbol) (only needed if value of “user” is phone number)","type":"text"},{"key":"otp","value":"{{otp}}","description":"One Time Passcode","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/login_user"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"user_id\": \"10\",\n        \"access_token\": \"df924d15a36e0ebb56b5d2de9e41e17d48e703323d0089a7676133e3686a8bf4409b03dfb104502492c70402fb8838e815d904dac48c8979fb57b08abf587521\",\n        \"token_type\": \"bearer\"\n    }\n}"}],"_postman_id":"37089797-e7a4-41b0-b840-4f542f2bf16b"},{"name":"Registration","id":"7a19776e-b75f-4181-9a0b-3e3bf23624ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"digits_reg_name","value":"","description":"<p>First Name</p>\n","type":"text"},{"key":"digits_reg_countrycode","value":"","description":"<p>Country Code (with + symbol)</p>\n","type":"text"},{"key":"digits_reg_mobile","value":"","description":"<p>Mobile Phone Number</p>\n","type":"text"},{"key":"digits_reg_password","value":"","description":"<p>Password</p>\n","type":"text"},{"key":"digits_reg_username","value":"","description":"<p>Username</p>\n","type":"text"},{"key":"digits_reg_email","value":"","description":"<p>Email</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/create_user","urlObject":{"path":["wp-json","digits","v1","create_user"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a19776e-b75f-4181-9a0b-3e3bf23624ab"},{"name":"Forgot Password","id":"9cde9121-e011-4e0b-b1b3-f6448bdabfaf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"user","value":"","description":"<p>User’s Phone Number / Email / Username</p>\n","type":"text"},{"key":"countrycode","value":"","description":"<p>Country code of Phone (with + symbol) (only needed if value of “user” is phone number)</p>\n","type":"text"},{"key":"otp","value":"","description":"<p>One Time Passcode (only needed if value of “user” is phone number)</p>\n","type":"text"},{"key":"password","value":"","description":"<p>User’s New Password (only needed if value of “user” is phone number)</p>\n","type":"text"},{"key":"ftoken","value":"","description":"<p>Firebase ID Token if using Firebase Gateway\n(only needed if value of “user” is phone number)</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/recovery","description":"<p>This endpoint allows users to reset their password using either their email address or mobile phone number within the WordPress environment. Users can initiate a password reset request by providing the necessary information through this API endpoint.</p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/recovery</code></p>\n<p><strong>Usage Notes:</strong></p>\n<ul>\n<li>Provide either the user's email address, mobile phone number, or username in the \"user\" parameter to initiate the password reset request.</li>\n<li>If the user's mobile phone number is used, include the country code in the \"countrycode\" parameter (with the + symbol).</li>\n<li>Include the One Time Passcode (OTP) parameter only if the value of the \"user\" parameter is a phone number. This is required for OTP verification.</li>\n<li>If using Firebase Gateway or Account Kit Gateway for authentication and the value of the \"user\" parameter is a phone number, include the Firebase ID Token (ftoken) or AccountKit authorization code for verification purposes.</li>\n<li>Provide the user's new password in the \"password\" parameter. This is required only if the value of the \"user\" parameter is a phone number.</li>\n</ul>\n","urlObject":{"path":["wp-json","digits","v1","recovery"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"b994d718-7e59-40ec-b74a-01ca446f6b87","name":"example","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"user","value":"{{user}}","description":"User’s Phone Number / Email / Username","type":"text"},{"key":"countrycode","value":"{{country code}}","description":"Country code of Phone (with + symbol) (only needed if value of “user” is phone number)","type":"text"},{"key":"otp","value":"{{otp}}","description":"One Time Passcode (only needed if value of “user” is phone number)","type":"text"},{"key":"password","value":"{{pwd}}","description":"User’s New Password (only needed if value of “user” is phone number)","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/recovery"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"user_id\": \"10\",\n        \"access_token\": \"8b24db5ccc475768216f983a8dda75c22a0856e40f9eba0227861d6d80a541a54512dca506cef7627888b13afc978e0caec1f8afc3e8bd28ca4fa7f39ae956db\",\n        \"token_type\": \"bearer\"\n    }\n}"}],"_postman_id":"9cde9121-e011-4e0b-b1b3-f6448bdabfaf"},{"name":"Logout","id":"58e2766f-873a-4ad9-9694-34b8974e4378","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"{{site}}/wp-json/digits/v1/logout","description":"<p>This endpoint allows users to log out of their session within the WordPress environment. By sending a request to this API endpoint, users can expire their Access Token, effectively ending their current session and enhancing security.</p>\n<p><strong>Authentication Requirement:</strong></p>\n<p>This request should be sent with an Access Token. Please refer to the \"Authentication\" section for more information on Access Tokens.</p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/logout</code>  </p>\n<p><strong>Usage Notes:</strong></p>\n<ul>\n<li>Ensure the request is sent with a valid Access Token to expire the token and terminate the user's session.</li>\n<li>By expiring the Access Token, users will be logged out of their current session, requiring them to authenticate again for future requests.</li>\n<li>This endpoint enhances security by providing users with the ability to actively terminate their sessions, reducing the risk of unauthorized access to their accounts.</li>\n</ul>\n","urlObject":{"path":["wp-json","digits","v1","logout"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"367e71a6-c501-4f2f-ad69-2b5c28517290","name":"example","originalRequest":{"method":"POST","header":[],"url":"{{site}}/wp-json/digits/v1/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"58e2766f-873a-4ad9-9694-34b8974e4378"},{"name":"OTP","id":"d367ac52-3ff1-4b02-8b81-391c1b4fad56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"","description":"<p>User’s Phone number country code (with + symbol)</p>\n","type":"text"},{"key":"mobileNo","value":"","description":"<p>User’s Phone number</p>\n","type":"text"},{"key":"type","value":"","description":"<p>login (if the action is login)\nregister (if the action is registration)\nresetpass (if the action is reset password)\nupdate (if the action is update phone)</p>\n","type":"text"},{"key":"whatsapp","value":"","description":"<p>1 (only if whatsapp is being used)</p>\n","type":"text"},{"key":"username","value":"","description":"<p>(for send_otp and type = register) if you want to validate and check if user exists with username before sending OTP</p>\n","type":"text"},{"key":"email","value":"","description":"<p>(for send_otp and type = register) if you want to validate and check if user exists with email before sending OTP</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/send_otp","description":"<p>These endpoints allow you to send and resend OTP (One-Time Password) for various user actions such as login, registration, reset password, or updating the phone number. Additionally, you can specify whether WhatsApp is being used and provide optional parameters like username and email for registration purposes.</p>\n<p><strong>Send OTP</strong></p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/send_otp</code></p>\n<h3 id=\"resend-otp\">Resend OTP</h3>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/resend_otp</code></p>\n","urlObject":{"path":["wp-json","digits","v1","send_otp"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"d4937f91-f6f8-40db-97e6-14d7d5000fc9","name":"update","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"type","value":"{{type}}","description":"update (if the action is update phone)","type":"text"},{"key":"username","value":"{{user}}","description":"optional","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/send_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"accountkit\": 0,\n    \"firebase\": 0,\n    \"code\": \"1\"\n}"},{"id":"ff9948ca-670d-458d-8b78-e72e5305504c","name":"forget_password","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"type","value":"{{type}}","description":"resetpass (if the action is reset password)","type":"text"},{"key":"username","value":"{{user}}","description":"optional","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/send_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"accountkit\": 0,\n    \"firebase\": 0,\n    \"code\": \"1\"\n}"},{"id":"ede3c65c-f916-4890-94ec-84930cb35116","name":"register","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"type","value":"{{type}}","description":"register (if the action is registration)","type":"text"},{"key":"username","value":"{{user}}","description":"(for send_otp and type = register) if you want to validate and check if user exists with username before sending OTP","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/send_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"accountkit\": 0,\n    \"firebase\": 0,\n    \"code\": \"1\"\n}"},{"id":"f62eecaf-090e-4931-be9b-80ac492f575e","name":"login_otp","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"type","value":"{{type}}","description":"login (if the action is login)","type":"text"},{"key":"username","value":"{{user}}","description":"optional","type":"text"}]},"url":"{{site}}wp-json/digits/v1/send_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"accountkit\": 0,\n    \"firebase\": 0,\n    \"code\": \"1\"\n}"}],"_postman_id":"d367ac52-3ff1-4b02-8b81-391c1b4fad56"},{"name":"Verify OTP","id":"8429410c-74c0-4eb5-8828-30a815464f3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"","description":"<p>User’s Phone number country code (with + symbol)</p>\n","type":"text"},{"key":"mobileNo","value":"","description":"<p>User’s Phone number</p>\n","type":"text"},{"key":"type","value":"","description":"<p>update (if the action is update phone)</p>\n","type":"text"},{"key":"otp","value":"","description":"<p>One Time Passcode (only if value of user is phone number)</p>\n","type":"text"},{"key":"whatsapp","value":"","description":"<p>1 (only if whatsapp is being used)</p>\n","type":"text"},{"key":"ftoken","value":"","description":"<p>Firebase ID Token (only needed if value of “user” is phone number, for Firebase)</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/verify_otp","description":"<p>This endpoint is used to verify a One Time Passcode (OTP) provided by the user within the WordPress environment. By sending a request to this API endpoint, users can confirm the validity of the OTP for various actions such as login, registration, password reset, or phone number update.</p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/verify_otp</code></p>\n<p><strong>Usage Notes:</strong></p>\n<ul>\n<li>Provide the user's phone number and country code in the \"countrycode\" and \"mobileNo\" parameters, respectively.</li>\n<li>Specify the type of action being performed using the \"type\" parameter. This could be login, registration, password reset, or phone number update.</li>\n<li>If WhatsApp integration is enabled, set the \"whatsapp\" parameter to 1.</li>\n<li>Include the One Time Passcode (OTP) parameter only if the value of the \"user\" parameter is a phone number. This is required for OTP verification.</li>\n<li>If using Firebase Gateway for OTP verification and the value of the \"user\" parameter is a phone number, include the Firebase ID Token (ftoken) for verification purposes.</li>\n</ul>\n","urlObject":{"path":["wp-json","digits","v1","verify_otp"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"d33a14c9-10ff-4613-a8be-323dfb0c2a75","name":"register","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"type","value":"{{type}}","description":"register (if the action is registration)","type":"text"},{"key":"otp","value":"{{otp}}","description":"One Time Passcode (only if value of user is phone number)","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/verify_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 1\n}"},{"id":"7542b53c-22e0-4b99-8861-88f2e81c4795","name":"update","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"type","value":"{{type}}","description":"if the type is update","type":"text"},{"key":"otp","value":"{{otp}}","description":"One Time Passcode (only if value of user is phone number)","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/verify_otp"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"code\": 1\n}"}],"_postman_id":"8429410c-74c0-4eb5-8828-30a815464f3d"},{"name":"Update Mobile Phone Number","id":"be03ce0e-4751-4f57-b25c-0e6fabda55b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"","description":"<p>User’s Phone number country code (with + symbol)</p>\n","type":"text"},{"key":"mobileNo","value":"","description":"<p>User’s New Phone number</p>\n","type":"text"},{"key":"otp","value":"","description":"<p>One Time Passcode (for verify_otp)(only if value of user is phone number)</p>\n","type":"text"},{"key":"whatsapp","value":"","description":"<p>1 (only if whatsapp is being used)</p>\n","type":"text"},{"key":"ftoken","value":"","description":"<p>Firebase ID Token (for verify_otp)(only needed if value of “user” is phone number, for Firebase)</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/update_phone","description":"<p>This endpoint enables users to update their mobile phone number within the WordPress environment. Users can send a request with the necessary information to update their phone number securely through this API endpoint.</p>\n<p><strong>Authentication Requirement:</strong></p>\n<p>This request should be sent with an Access Token. Please refer to the \"Authentication\" section for more information on Access Tokens.</p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/update_phone</code></p>\n<p><strong>Usage Notes:</strong></p>\n<ul>\n<li>Ensure all required parameters are included in the request to successfully update the user's mobile phone number.</li>\n<li>Provide the user's current country code and their new phone number in the \"countrycode\" and \"mobileNo\" parameters, respectively.</li>\n<li>If WhatsApp integration is enabled, set the \"whatsapp\" parameter to 1.</li>\n<li>Include the One Time Passcode (OTP) parameter only if the value of the \"user\" parameter is a phone number. This is required for OTP verification.</li>\n<li>If Firebase is being used for OTP verification and the value of the \"user\" parameter is a phone number, include the Firebase ID Token (ftoken) for verification purposes.</li>\n</ul>\n","urlObject":{"path":["wp-json","digits","v1","update_phone"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"9ea49f2f-dfde-4ee5-bf16-8531c166650d","name":"example","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"countrycode","value":"{{country code}}","description":"User’s Phone number country code (with + symbol)","type":"text"},{"key":"mobileNo","value":"{{mobile}}","description":"User’s New Phone number","type":"text"},{"key":"otp","value":"{{otp}}","description":"One Time Passcode (for verify_otp)(only if value of user is phone number)","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/update_phone"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true\n}"}],"_postman_id":"be03ce0e-4751-4f57-b25c-0e6fabda55b5"},{"name":"One Click Login/Signup","id":"6de4d78a-78ad-4e49-83d8-a8ab6abd9f27","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"mobileNo","value":"","description":"<p>User’s Phone number</p>\n","type":"text"},{"key":"countrycode","value":"","description":"<p>Country code of Phone (with + symbol)</p>\n","type":"text"},{"key":"otp","value":"","description":"<p>One Time Passcode</p>\n","type":"text"},{"key":"ftoken","value":"","description":"<p>Firebase ID Token if using Firebase Gateway</p>\n","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/one_click","description":"<p>This endpoint enables users to perform one-click login or signup actions within the WordPress environment. It requires the One Click Login/Signup Addon to function properly. Additionally, if Firebase is being used, the Firebase ID Token (Ftoken) needs to be obtained using Firebase's SDK. For other gateways, the <code>wp-json/digits/v1/send_otp</code> endpoint should be called first, with the <code>type</code> parameter set to <code>login</code>.</p>\n<p><strong>Endpoint:</strong> <code>wp-json/digits/v1/one_click</code></p>\n<p><strong>Usage Notes:</strong></p>\n<ul>\n<li>Provide the user's phone number and country code in the \"mobileNo\" and \"countrycode\" parameters, respectively.</li>\n<li>Include the One Time Passcode (OTP) parameter for verification.</li>\n<li>If using Firebase Gateway, obtain the Firebase ID Token (Ftoken) using Firebase's SDK and include it in the request.</li>\n<li>If using Account Kit Gateway or any other gateway, call the <code>wp-json/digits/v1/send_otp</code> endpoint first with the <code>type</code> parameter set to <code>login</code> to obtain the authorization code, and then include it in the request.</li>\n</ul>\n","urlObject":{"path":["wp-json","digits","v1","one_click"],"host":["{{site}}"],"query":[],"variable":[]}},"response":[{"id":"6b9bf3e6-5a8a-443a-b34b-7f660ff85a48","name":"example","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"mobileNo","value":"{{mobile}}","description":"User’s Phone number","type":"text"},{"key":"countrycode","value":"{{country code}}","description":"Country code of Phone (with + symbol)","type":"text"},{"key":"otp","value":"{{otp}}","description":"One Time Passcode","type":"text"}]},"url":"{{site}}/wp-json/digits/v1/one_click"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"data\": {\n        \"user_id\": \"10\",\n        \"access_token\": \"845ffc25cf1356515756a31ab24a6f8e6211a4a2a6549d64609e8fecd7aabb47f4cb78a86f268f1273106cde85fa644a8a6c3123e936c3bc29ce28f7e2150b00\",\n        \"token_type\": \"bearer\"\n    }\n}"}],"_postman_id":"6de4d78a-78ad-4e49-83d8-a8ab6abd9f27"}]}