{"info":{"_postman_id":"292bc95c-e9d4-4b44-afc6-0bb13545335a","name":"M1001's APIs auth","description":"<html><head></head><body><p>This API lets you obtain (and refresh) a <strong>Bearer token</strong> to authenticate yourself to use M1001's APIs.</p>\n<p>You can create a single token for all APIs listed <a href=\"https://linktr.ee/m1001_\">here</a>.</p>\n<p>My services are actually available only for my <a href=\"https://www.buymeacoffee.com/m1001\">supporters</a> (one-time donations).</p>\n<h2 id=\"endpoints\">Endpoints</h2>\n<p>There are two endpoints:</p>\n<ul>\n<li><p><a href=\"https://documenter.getpostman.com/view/24385138/2s8ZDcyf51#41ed1c9e-2947-4c1a-ae3f-d1bd9fda5ec1\">token</a></p>\n</li>\n<li><p><a href=\"https://documenter.getpostman.com/view/24385138/2s8ZDcyf51#d8ee212b-97ec-4117-8aa7-a7998399209e\">refresh</a></p>\n</li>\n</ul>\n<h2 id=\"response-codes\">Response codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Status code</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200 OK</td>\n<td>All just went in the right way</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>Missing parameter(s)</td>\n</tr>\n<tr>\n<td>405 Method Not Allowed</td>\n<td>Method not allowed</td>\n</tr>\n<tr>\n<td>409 Conflict</td>\n<td>Email already used</td>\n</tr>\n<tr>\n<td>422 Unprocessable Entity</td>\n<td>Invalid parameter(s)</td>\n</tr>\n</tbody>\n</table>\n</div><pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-Markup\">88b       d88      88     ,a8888a,        ,a8888a,         88\n888b     d888   ,d888   ,8P\"'  `\"Y8,    ,8P\"'  `\"Y8,    ,d888\n88`8b   d8'88  88\" 88  ,8P        Y8,  ,8P        Y8,  88\" 88\n88 `8b d8' 88      88  88          88  88          88      88\n88  `888'  88      88  88          88  88          88      88\n88   `8'   88      88  `8b        d8'  `8b        d8'      88\n88         88      88   `8ba,  ,ad8'    `8ba,  ,ad8'       88\n88         88      88     \"Y8888P\"        \"Y8888P\"         88\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"24385138","collectionId":"292bc95c-e9d4-4b44-afc6-0bb13545335a","publishedId":"2s8ZDcyf51","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"505050","highlight":"0A3321"},"publishDate":"2026-09-28T07:23:40.000Z"},"item":[{"name":"Token","id":"41ed1c9e-2947-4c1a-ae3f-d1bd9fda5ec1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"url":"https://www.m1001.eu/api/services/auth/token","description":"<p>To generate an exclusive <strong>Bearer token</strong>, you need to be an <a href=\"https://www.buymeacoffee.com/m1001\"><b>M1001 supporter</b></a>, I offer my API services to my supporters just to thank them for giving value to the time I spend programming, I don't care about the amount of the donation, all the supporters receive access to my APIs.</p>\n<p>If you are one of my supporters, you just need to send an HTTPS request to the URL above including the email you used to donate as the \"<strong>email</strong>\" parameter via the <em><strong>POST</strong></em> method and you will receive a JSON response.</p>\n<p>If you lose the token, you can replace it using the <em><strong>PUT</strong></em> method after creating a <strong>refresh token</strong> via the \"<strong>refresh</strong>\" <a href=\"https://documenter.getpostman.com/view/24385138/2s8ZDcyf51#d8ee212b-97ec-4117-8aa7-a7998399209e\">endpoint</a>.</p>\n<p><strong>Be aware</strong>: after the token creation, you will receive it once via email and never again.</p>\n<h2 id=\"how-to-use-a-bearer-token\">How to use a Bearer token</h2>\n<p>If you don't know how to use a <strong>Bearer token</strong>, I can safely tell you that it's very easy, you just need to put an <strong>Authorization header</strong>, so use \"<strong>Authorization</strong>\" as key for your header and put \"<em>Bearer example_token</em>\" as value, like this:</p>\n<blockquote>\n<p>Authorization: Bearer example_token </p>\n</blockquote>\n<p><strong>Be aware</strong>: obviously put your token instead of the fictitious value \"example_token\".</p>\n<h4 id=\"parameters-table\">Parameters table</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Where</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n<th><strong>Valid values</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>Request body</td>\n<td>Yes</td>\n<td>Email to send the Bearer token to</td>\n<td>Email addresses used to make a donation to M1001 via \"<strong>Buy me a coffee</strong>\"</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","services","auth","token"],"host":["www","m1001","eu"],"query":[],"variable":[]}},"response":[{"id":"269b3b80-9542-4310-b445-bdb9a21184dd","name":"Token","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"example@gmail.com","type":"text"}]},"url":"https://www.m1001.eu/api/services/auth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 30 Apr 2025 11:02:57 GMT"},{"key":"Server","value":"Apache"},{"key":"Cache-Control","value":"no-store"},{"key":"Allow","value":"POST, PUT"},{"key":"Upgrade","value":"h2c"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"X-Adsense-Platform-Domain","value":"altervista.com"},{"key":"Keep-Alive","value":"timeout=1, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": \"Your Bearer token has been sent to your email, don't delete the email until you write it down somewhere safe (also check junk email)\"\n}"}],"_postman_id":"41ed1c9e-2947-4c1a-ae3f-d1bd9fda5ec1"},{"name":"Token","id":"9a33bdb9-3236-4249-9ff7-48a7a25e000d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[],"url":"https://www.m1001.eu/api/services/auth/token","description":"<p>If your <strong>Bearer token</strong> has been compromised/lost, don't worry! You can just refresh it!</p>\n<p>First you will have to create a <strong>refresh token</strong> via the \"<strong>refresh</strong>\" <a href=\"https://documenter.getpostman.com/view/24385138/2s8ZDcyf51#d8ee212b-97ec-4117-8aa7-a7998399209e\">endpoint</a>.<br />Then, you will have to send a HTTPS request to the URL above using \"<strong>email</strong>\" (the one you registered with) and \"<strong>refresh_token</strong>\" (the one you received in the email box) as parameters via the <em><strong>PUT</strong></em> method and you will receive a JSON response.</p>\n<p><strong>Be aware</strong>: every <strong>refresh token</strong> can be used only <strong>one time</strong> and only for the <strong>next 60 minutes</strong> after its creation. Only the <em><strong>last</strong></em> <strong>refresh token</strong> created will be valid.</p>\n<p><strong>Be aware</strong>: the <strong>Content-Type header</strong> must be \"<strong>application/x-www-form-urlencoded</strong>\".</p>\n<h4 id=\"parameters-table\">Parameters table</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Where</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n<th><strong>Valid values</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>Request body</td>\n<td>Yes</td>\n<td>Email to send the Bearer token to</td>\n<td>Email addresses used to generate a refresh token</td>\n</tr>\n<tr>\n<td>refresh_token</td>\n<td>Request body</td>\n<td>Yes</td>\n<td>Refresh token received via email</td>\n<td>Refresh token sent to the provided email</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","services","auth","token"],"host":["www","m1001","eu"],"query":[],"variable":[]}},"response":[{"id":"240ec4d7-b3e3-4adb-b16b-e476b2b47c86","name":"Token","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"example@gmail.com","type":"text"},{"key":"refresh_token","value":"example","type":"text"}]},"url":"https://www.m1001.eu/api/services/auth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 30 Apr 2025 11:11:23 GMT"},{"key":"Server","value":"Apache"},{"key":"Cache-Control","value":"no-store"},{"key":"Allow","value":"POST, PUT"},{"key":"Upgrade","value":"h2c"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"X-Adsense-Platform-Domain","value":"altervista.com"},{"key":"Keep-Alive","value":"timeout=1, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": \"Your Bearer token has been sent to your email, don't delete the email until you write it down somewhere safe (also check junk email)\"\n}"}],"_postman_id":"9a33bdb9-3236-4249-9ff7-48a7a25e000d"},{"name":"Refresh","id":"d8ee212b-97ec-4117-8aa7-a7998399209e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"url":"https://www.m1001.eu/api/services/auth/refresh","description":"<p>To create a <strong>refresh token</strong>, you just need to send an HTTPS request to the URL above including the email you used to donate as the \"<strong>email</strong>\" parameter via the <em><strong>POST</strong></em> method and you will receive a JSON response.<br />Then, you will have to use the \"<strong>token</strong>\" <a href=\"https://documenter.getpostman.com/view/24385138/2s8ZDcyf51#9a33bdb9-3236-4249-9ff7-48a7a25e000d\">endpoint</a> to replace your <strong>Bearer token</strong>.</p>\n<p><strong>Be aware</strong>: every <strong>refresh token</strong> can be used only <strong>one time</strong> and only for the <strong>next 60 minutes</strong> after its creation. Only the <em><strong>last</strong></em> <strong>refresh token</strong> created will be valid.</p>\n<h4 id=\"parameters-table\">Parameters table</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Where</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n<th><strong>Valid values</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>Request body</td>\n<td>Yes</td>\n<td>Email to send the refresh token to</td>\n<td>Email addresses used to make a donation to M1001 via \"<strong>Buy me a coffee</strong>\"</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","services","auth","refresh"],"host":["www","m1001","eu"],"query":[],"variable":[]}},"response":[{"id":"05b272a1-35b9-4827-850c-cfa576353fb8","name":"Refresh","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"example@gmail.com","type":"text"}]},"url":"https://www.m1001.eu/api/services/auth/refresh"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 30 Apr 2025 11:07:18 GMT"},{"key":"Server","value":"Apache"},{"key":"Cache-Control","value":"no-store"},{"key":"Allow","value":"POST"},{"key":"Upgrade","value":"h2c"},{"key":"Connection","value":"Upgrade, Keep-Alive"},{"key":"X-Adsense-Platform-Domain","value":"altervista.com"},{"key":"Keep-Alive","value":"timeout=1, max=100"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": \"A refresh token has been sent to your email, you'll be able to use it for the next 60 minutes (also check junk email)\"\n}"}],"_postman_id":"d8ee212b-97ec-4117-8aa7-a7998399209e"}]}