Login Session avatar

Login Session

Try for free

No credit card required

Go to Store
Login Session

Login Session

pocesar/login-session
Try for free

No credit card required

Get localStorage, sessionStorage and cookies from logins for usage in other actors.

You can access the Login Session programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.1",
5    "x-build-id": "Zk7LGi74MKF4Fjb1p"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/pocesar~login-session/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-pocesar-login-session",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/pocesar~login-session/runs": {
50      "post": {
51        "operationId": "runs-sync-pocesar-login-session",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/pocesar~login-session/run-sync": {
93      "post": {
94        "operationId": "run-sync-pocesar-login-session",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "required": [
134          "username",
135          "password",
136          "website",
137          "steps",
138          "cookieDomains"
139        ],
140        "properties": {
141          "username": {
142            "title": "Your username",
143            "type": "string",
144            "description": "The username/email that will be passed to the form"
145          },
146          "password": {
147            "title": "Your password",
148            "type": "string",
149            "description": "The password that will be passed to the form"
150          },
151          "userAgent": {
152            "title": "Browser User Agent",
153            "type": "string",
154            "description": "Choose an user-agent string",
155            "default": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
156          },
157          "maxRequestRetries": {
158            "title": "Max request retries",
159            "type": "integer",
160            "description": "How many retries before considering the request as failed",
161            "default": 0
162          },
163          "website": {
164            "title": "Website to grab a session from",
165            "minItems": 1,
166            "maxItems": 1,
167            "uniqueItems": true,
168            "type": "array",
169            "description": "The website to get the session from. The login form should be available on the provided url",
170            "items": {
171              "type": "object",
172              "required": [
173                "url"
174              ],
175              "properties": {
176                "url": {
177                  "type": "string",
178                  "title": "URL of a web page",
179                  "format": "uri"
180                }
181              }
182            }
183          },
184          "sessionConfig": {
185            "title": "Session configuration",
186            "type": "object",
187            "description": "The configuration for your sessions",
188            "default": {
189              "storageName": "login-sessions",
190              "maxAgeSecs": 86400,
191              "maxUsageCount": 10000,
192              "maxPoolSize": 1
193            }
194          },
195          "steps": {
196            "title": "Steps",
197            "type": "array",
198            "description": "Each step that should be taken for the login to happen. For multi-stage logins (username then password), provide multiple steps"
199          },
200          "cookieDomains": {
201            "title": "Cookie domains",
202            "type": "array",
203            "description": "Specify the domains that should get cookies from",
204            "default": [],
205            "items": {
206              "type": "string"
207            }
208          },
209          "gotoTimeout": {
210            "title": "Visit page timeout",
211            "type": "integer",
212            "description": "How many seconds until page.goto should wait",
213            "default": 30
214          },
215          "proxyConfiguration": {
216            "title": "Proxy configuration",
217            "type": "object",
218            "description": "Select proxies to be used by your actor."
219          },
220          "extraUrlPatterns": {
221            "title": "Extra url blocking patterns",
222            "type": "array",
223            "description": "Passes this blocking pattern to puppeteer.blockRequests, so you can selectively block some requests on the page",
224            "default": [],
225            "items": {
226              "type": "string"
227            }
228          },
229          "forceCloud": {
230            "title": "Force cloud",
231            "type": "boolean",
232            "description": "Use this when you execute the actor locally in your machine, but fills the session storage on the Apify platform",
233            "default": true
234          },
235          "countryCode": {
236            "title": "Proxy country",
237            "type": "string",
238            "description": "Set the proxy country to pass to proxy configuration when using RESIDENTIALS"
239          }
240        }
241      },
242      "runsResponseSchema": {
243        "type": "object",
244        "properties": {
245          "data": {
246            "type": "object",
247            "properties": {
248              "id": {
249                "type": "string"
250              },
251              "actId": {
252                "type": "string"
253              },
254              "userId": {
255                "type": "string"
256              },
257              "startedAt": {
258                "type": "string",
259                "format": "date-time",
260                "example": "2025-01-08T00:00:00.000Z"
261              },
262              "finishedAt": {
263                "type": "string",
264                "format": "date-time",
265                "example": "2025-01-08T00:00:00.000Z"
266              },
267              "status": {
268                "type": "string",
269                "example": "READY"
270              },
271              "meta": {
272                "type": "object",
273                "properties": {
274                  "origin": {
275                    "type": "string",
276                    "example": "API"
277                  },
278                  "userAgent": {
279                    "type": "string"
280                  }
281                }
282              },
283              "stats": {
284                "type": "object",
285                "properties": {
286                  "inputBodyLen": {
287                    "type": "integer",
288                    "example": 2000
289                  },
290                  "rebootCount": {
291                    "type": "integer",
292                    "example": 0
293                  },
294                  "restartCount": {
295                    "type": "integer",
296                    "example": 0
297                  },
298                  "resurrectCount": {
299                    "type": "integer",
300                    "example": 0
301                  },
302                  "computeUnits": {
303                    "type": "integer",
304                    "example": 0
305                  }
306                }
307              },
308              "options": {
309                "type": "object",
310                "properties": {
311                  "build": {
312                    "type": "string",
313                    "example": "latest"
314                  },
315                  "timeoutSecs": {
316                    "type": "integer",
317                    "example": 300
318                  },
319                  "memoryMbytes": {
320                    "type": "integer",
321                    "example": 1024
322                  },
323                  "diskMbytes": {
324                    "type": "integer",
325                    "example": 2048
326                  }
327                }
328              },
329              "buildId": {
330                "type": "string"
331              },
332              "defaultKeyValueStoreId": {
333                "type": "string"
334              },
335              "defaultDatasetId": {
336                "type": "string"
337              },
338              "defaultRequestQueueId": {
339                "type": "string"
340              },
341              "buildNumber": {
342                "type": "string",
343                "example": "1.0.0"
344              },
345              "containerUrl": {
346                "type": "string"
347              },
348              "usage": {
349                "type": "object",
350                "properties": {
351                  "ACTOR_COMPUTE_UNITS": {
352                    "type": "integer",
353                    "example": 0
354                  },
355                  "DATASET_READS": {
356                    "type": "integer",
357                    "example": 0
358                  },
359                  "DATASET_WRITES": {
360                    "type": "integer",
361                    "example": 0
362                  },
363                  "KEY_VALUE_STORE_READS": {
364                    "type": "integer",
365                    "example": 0
366                  },
367                  "KEY_VALUE_STORE_WRITES": {
368                    "type": "integer",
369                    "example": 1
370                  },
371                  "KEY_VALUE_STORE_LISTS": {
372                    "type": "integer",
373                    "example": 0
374                  },
375                  "REQUEST_QUEUE_READS": {
376                    "type": "integer",
377                    "example": 0
378                  },
379                  "REQUEST_QUEUE_WRITES": {
380                    "type": "integer",
381                    "example": 0
382                  },
383                  "DATA_TRANSFER_INTERNAL_GBYTES": {
384                    "type": "integer",
385                    "example": 0
386                  },
387                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
388                    "type": "integer",
389                    "example": 0
390                  },
391                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
392                    "type": "integer",
393                    "example": 0
394                  },
395                  "PROXY_SERPS": {
396                    "type": "integer",
397                    "example": 0
398                  }
399                }
400              },
401              "usageTotalUsd": {
402                "type": "number",
403                "example": 0.00005
404              },
405              "usageUsd": {
406                "type": "object",
407                "properties": {
408                  "ACTOR_COMPUTE_UNITS": {
409                    "type": "integer",
410                    "example": 0
411                  },
412                  "DATASET_READS": {
413                    "type": "integer",
414                    "example": 0
415                  },
416                  "DATASET_WRITES": {
417                    "type": "integer",
418                    "example": 0
419                  },
420                  "KEY_VALUE_STORE_READS": {
421                    "type": "integer",
422                    "example": 0
423                  },
424                  "KEY_VALUE_STORE_WRITES": {
425                    "type": "number",
426                    "example": 0.00005
427                  },
428                  "KEY_VALUE_STORE_LISTS": {
429                    "type": "integer",
430                    "example": 0
431                  },
432                  "REQUEST_QUEUE_READS": {
433                    "type": "integer",
434                    "example": 0
435                  },
436                  "REQUEST_QUEUE_WRITES": {
437                    "type": "integer",
438                    "example": 0
439                  },
440                  "DATA_TRANSFER_INTERNAL_GBYTES": {
441                    "type": "integer",
442                    "example": 0
443                  },
444                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
445                    "type": "integer",
446                    "example": 0
447                  },
448                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
449                    "type": "integer",
450                    "example": 0
451                  },
452                  "PROXY_SERPS": {
453                    "type": "integer",
454                    "example": 0
455                  }
456                }
457              }
458            }
459          }
460        }
461      }
462    }
463  }
464}

Login Session OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Login Session from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Developer
Maintained by Community

Actor Metrics

  • 12 monthly users

  • 6 stars

  • 4.3% runs succeeded

  • 71 days response time

  • Created in Feb 2020

  • Modified 4 years ago