![Login Session avatar](https://images.apifyusercontent.com/4aW0G8bfsoSu1SK0IkkWJTd1-JIzmVNfnsWIuPboyHE/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9QMk0zZFp6cnZpblpBMjQ1NC85ajl2NG85cXJqekxRVGc1ay1pbWdfMzExODQ2LnBuZw.webp)
Login Session
Try for free
No credit card required
View all Actors![Login Session](https://images.apifyusercontent.com/4aW0G8bfsoSu1SK0IkkWJTd1-JIzmVNfnsWIuPboyHE/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9QMk0zZFp6cnZpblpBMjQ1NC85ajl2NG85cXJqekxRVGc1ay1pbWdfMzExODQ2LnBuZw.webp)
![Login Session](https://images.apifyusercontent.com/4aW0G8bfsoSu1SK0IkkWJTd1-JIzmVNfnsWIuPboyHE/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9QMk0zZFp6cnZpblpBMjQ1NC85ajl2NG85cXJqekxRVGc1ay1pbWdfMzExODQ2LnBuZw.webp)
Login Session
pocesar/login-session
Try for free
No credit card required
Get localStorage, sessionStorage and cookies from logins for usage in other actors.
The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
1# Set API token
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7 "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36",
8 "maxRequestRetries": 0,
9 "sessionConfig": {
10 "storageName": "login-sessions",
11 "maxAgeSecs": 3600,
12 "maxUsageCount": 100,
13 "maxPoolSize": 100
14 },
15 "steps": [
16 {
17 "username": {
18 "selector": "input#email"
19 },
20 "password": {
21 "selector": "input#pass"
22 },
23 "submit": {
24 "selector": "input[type=\"submit\"]"
25 },
26 "failed": {
27 "selector": "[role=\"alert\"]"
28 },
29 "waitForMillis": 5000
30 }
31 ],
32 "cookieDomains": [],
33 "gotoTimeout": 30,
34 "proxyConfiguration": {
35 "useApifyProxy": true
36 },
37 "extraUrlPatterns": []
38}
39EOF
40
41# Run the Actor using an HTTP API
42# See the full API reference at https://docs.apify.com/api/v2
43curl "https://api.apify.com/v2/acts/pocesar~login-session/runs?token=$API_TOKEN" \
44 -X POST \
45 -d @input.json \
46 -H 'Content-Type: application/json'
Developer
Maintained by Community
Actor metrics
- 11 monthly users
- 6 stars
- 6.6% runs succeeded
- Created in Feb 2020
- Modified over 3 years ago
Categories