Spaces:
Paused
Paused
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Appstate Login Getter Documentation</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <!-- Include Prism.js for syntax highlighting --> | |
| <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" rel="stylesheet" /> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script> | |
| <style> | |
| .fade-in { | |
| animation: fadeIn 1s ease-out; | |
| } | |
| @keyframes fadeIn { | |
| 0% { | |
| opacity: 0; | |
| transform: translateY(-30px); | |
| } | |
| 100% { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| body { | |
| font-family: 'Arial', sans-serif; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <header class="bg-gray-800 text-white py-6"> | |
| <div class="container mx-auto text-center"> | |
| <h1 class="text-3xl font-semibold">Appstate Login Getter Documentation</h1> | |
| <p class="text-xl">Created by Jonell Hutchin Magallanes</p> | |
| </div> | |
| </header> | |
| <main class="container mx-auto p-6"> | |
| <section class="fade-in"> | |
| <h2 class="text-2xl font-semibold text-gray-800 mb-4">Overview</h2> | |
| <p class="text-lg text-gray-700"> | |
| This appstate login getter is a simple Node.js application that uses Puppeteer to log into Facebook. | |
| The application takes an email and password as query parameters and returns a JSON response with cookies | |
| and other session data. The app uses Puppeteer for browser automation and logging into Facebook securely. | |
| </p> | |
| </section> | |
| <section class="fade-in mt-8"> | |
| <h2 class="text-2xl font-semibold text-gray-800 mb-4">API Endpoints</h2> | |
| <div class="mb-6"> | |
| <h3 class="text-xl font-semibold text-gray-800">GET /appstate</h3> | |
| <p class="text-lg text-gray-700">Logs into Facebook with the provided email and password and returns session data (cookies and datr cookie). The response is in JSON format.</p> | |
| <h4 class="text-lg text-gray-700 font-medium mt-4">Request Parameters</h4> | |
| <ul class="list-disc pl-6 text-gray-700"> | |
| <li><strong>e</strong>: Email address for Facebook login</li> | |
| <li><strong>p</strong>: Password for Facebook login</li> | |
| </ul> | |
| <h4 class="text-lg text-gray-700 font-medium mt-4">Example Request (Node.js)</h4> | |
| <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-javascript"> | |
| const axios = require('axios'); | |
| // Dynamically fetch the current host | |
| const currentHost = window.location.host; | |
| const apiUrl = `http://${currentHost}/appstate`; // Create the full API URL | |
| axios.get(apiUrl, { | |
| params: { | |
| e: 'your-email@example.com', | |
| p: 'yourpassword' | |
| } | |
| }) | |
| .then(response => console.log(response.data)) | |
| .catch(error => console.error(error));</code></pre> | |
| <h4 class="text-lg text-gray-700 font-medium mt-4">Example Response</h4> | |
| <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-json"> | |
| { | |
| "cookies": "cookie1=value1; cookie2=value2", | |
| "jsonCookies": [ | |
| { | |
| "domain": ".facebook.com", | |
| "expirationDate": 1673811600, | |
| "hostOnly": false, | |
| "httpOnly": true, | |
| "name": "cookie1", | |
| "path": "/", | |
| "sameSite": "Strict", | |
| "secure": true, | |
| "session": false, | |
| "storeId": "12345", | |
| "value": "value1" | |
| }, | |
| { | |
| "domain": ".facebook.com", | |
| "expirationDate": 1673811600, | |
| "hostOnly": false, | |
| "httpOnly": true, | |
| "name": "cookie2", | |
| "path": "/", | |
| "sameSite": "Strict", | |
| "secure": true, | |
| "session": false, | |
| "storeId": "12345", | |
| "value": "value2" | |
| } | |
| ], | |
| "datr": "abcdef123456", | |
| "status": "success" | |
| }</code></pre> | |
| </div> | |
| <h4 class="text-xl font-semibold text-gray-800 mt-6">Example Request (Python)</h4> | |
| <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-python"> | |
| import requests | |
| # Dynamically fetch the current host | |
| current_host = window.location.host | |
| api_url = f"http://{current_host}/appstate" | |
| response = requests.get(api_url, params={'e': 'your-email@example.com', 'p': 'yourpassword'}) | |
| print(response.json())</code></pre> | |
| <h4 class="text-xl font-semibold text-gray-800 mt-6">Example Request (PHP)</h4> | |
| <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-php"> | |
| <?php | |
| $host = $_SERVER['HTTP_HOST']; | |
| $apiUrl = "http://{$host}/appstate"; | |
| $response = file_get_contents("{$apiUrl}?e=your-email@example.com&p=yourpassword"); | |
| echo $response; | |
| ?></code></pre> | |
| <h4 class="text-xl font-semibold text-gray-800 mt-6">Example Request (cURL)</h4> | |
| <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-shell"> | |
| curl -X GET "http://{currentHost}/appstate?e=your-email@example.com&p=yourpassword"</code></pre> | |
| </section> | |
| <footer class="bg-gray-800 text-white py-4 text-center"> | |
| <p>Appstate Login Getter - Created by Jonell Hutchin Magallanes</p> | |
| </footer> | |
| </main> | |
| <script> | |
| // Dynamically fetch the current host for API requests | |
| const currentHost = window.location.host; | |
| const apiUrl = `http://${currentHost}/appstate`; | |
| console.log('Current Host:', currentHost); | |
| console.log('API URL:', apiUrl); | |
| </script> | |
| </body> | |
| </html> |