Jonell01 commited on
Commit
17bc126
·
verified ·
1 Parent(s): 3dde51d

Create docs.html

Browse files
Files changed (1) hide show
  1. public/docs.html +163 -0
public/docs.html ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Appstate Login Getter Documentation</title>
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <!-- Include Prism.js for syntax highlighting -->
10
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" rel="stylesheet" />
11
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
12
+ <style>
13
+ .fade-in {
14
+ animation: fadeIn 1s ease-out;
15
+ }
16
+
17
+ @keyframes fadeIn {
18
+ 0% {
19
+ opacity: 0;
20
+ transform: translateY(-30px);
21
+ }
22
+
23
+ 100% {
24
+ opacity: 1;
25
+ transform: translateY(0);
26
+ }
27
+ }
28
+
29
+ body {
30
+ font-family: 'Arial', sans-serif;
31
+ }
32
+ </style>
33
+ </head>
34
+
35
+ <body class="bg-gray-100 font-sans">
36
+
37
+ <header class="bg-gray-800 text-white py-6">
38
+ <div class="container mx-auto text-center">
39
+ <h1 class="text-3xl font-semibold">Appstate Login Getter Documentation</h1>
40
+ <p class="text-xl">Created by Jonell Hutchin Magallanes</p>
41
+ </div>
42
+ </header>
43
+
44
+ <main class="container mx-auto p-6">
45
+ <section class="fade-in">
46
+ <h2 class="text-2xl font-semibold text-gray-800 mb-4">Overview</h2>
47
+ <p class="text-lg text-gray-700">
48
+ This appstate login getter is a simple Node.js application that uses Puppeteer to log into Facebook.
49
+ The application takes an email and password as query parameters and returns a JSON response with cookies
50
+ and other session data. The app uses Puppeteer for browser automation and logging into Facebook securely.
51
+ </p>
52
+ </section>
53
+
54
+ <section class="fade-in mt-8">
55
+ <h2 class="text-2xl font-semibold text-gray-800 mb-4">API Endpoints</h2>
56
+ <div class="mb-6">
57
+ <h3 class="text-xl font-semibold text-gray-800">GET /appstate</h3>
58
+ <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>
59
+
60
+ <h4 class="text-lg text-gray-700 font-medium mt-4">Request Parameters</h4>
61
+ <ul class="list-disc pl-6 text-gray-700">
62
+ <li><strong>e</strong>: Email address for Facebook login</li>
63
+ <li><strong>p</strong>: Password for Facebook login</li>
64
+ </ul>
65
+
66
+ <h4 class="text-lg text-gray-700 font-medium mt-4">Example Request (Node.js)</h4>
67
+ <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-javascript">
68
+ const axios = require('axios');
69
+
70
+ // Dynamically fetch the current host
71
+ const currentHost = window.location.host;
72
+ const apiUrl = `http://${currentHost}/appstate`; // Create the full API URL
73
+
74
+ axios.get(apiUrl, {
75
+ params: {
76
+ e: 'your-email@example.com',
77
+ p: 'yourpassword'
78
+ }
79
+ })
80
+ .then(response => console.log(response.data))
81
+ .catch(error => console.error(error));</code></pre>
82
+
83
+ <h4 class="text-lg text-gray-700 font-medium mt-4">Example Response</h4>
84
+ <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-json">
85
+ {
86
+ "cookies": "cookie1=value1; cookie2=value2",
87
+ "jsonCookies": [
88
+ {
89
+ "domain": ".facebook.com",
90
+ "expirationDate": 1673811600,
91
+ "hostOnly": false,
92
+ "httpOnly": true,
93
+ "name": "cookie1",
94
+ "path": "/",
95
+ "sameSite": "Strict",
96
+ "secure": true,
97
+ "session": false,
98
+ "storeId": "12345",
99
+ "value": "value1"
100
+ },
101
+ {
102
+ "domain": ".facebook.com",
103
+ "expirationDate": 1673811600,
104
+ "hostOnly": false,
105
+ "httpOnly": true,
106
+ "name": "cookie2",
107
+ "path": "/",
108
+ "sameSite": "Strict",
109
+ "secure": true,
110
+ "session": false,
111
+ "storeId": "12345",
112
+ "value": "value2"
113
+ }
114
+ ],
115
+ "datr": "abcdef123456",
116
+ "status": "success"
117
+ }</code></pre>
118
+ </div>
119
+
120
+ <h4 class="text-xl font-semibold text-gray-800 mt-6">Example Request (Python)</h4>
121
+ <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-python">
122
+ import requests
123
+
124
+ # Dynamically fetch the current host
125
+ current_host = window.location.host
126
+ api_url = f"http://{current_host}/appstate"
127
+
128
+ response = requests.get(api_url, params={'e': 'your-email@example.com', 'p': 'yourpassword'})
129
+ print(response.json())</code></pre>
130
+
131
+ <h4 class="text-xl font-semibold text-gray-800 mt-6">Example Request (PHP)</h4>
132
+ <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-php">
133
+ &lt;?php
134
+ $host = $_SERVER['HTTP_HOST'];
135
+ $apiUrl = "http://{$host}/appstate";
136
+
137
+ $response = file_get_contents("{$apiUrl}?e=your-email@example.com&p=yourpassword");
138
+ echo $response;
139
+ ?&gt;</code></pre>
140
+
141
+ <h4 class="text-xl font-semibold text-gray-800 mt-6">Example Request (cURL)</h4>
142
+ <pre class="bg-gray-800 text-white p-4 rounded-md"><code class="language-shell">
143
+ curl -X GET "http://{currentHost}/appstate?e=your-email@example.com&p=yourpassword"</code></pre>
144
+ </section>
145
+
146
+ <footer class="bg-gray-800 text-white py-4 text-center">
147
+ <p>Appstate Login Getter - Created by Jonell Hutchin Magallanes</p>
148
+ </footer>
149
+
150
+ </main>
151
+
152
+ <script>
153
+ // Dynamically fetch the current host for API requests
154
+ const currentHost = window.location.host;
155
+ const apiUrl = `http://${currentHost}/appstate`;
156
+
157
+ console.log('Current Host:', currentHost);
158
+ console.log('API URL:', apiUrl);
159
+ </script>
160
+
161
+ </body>
162
+
163
+ </html>