Login Session avatar
Login Session
Try for free

No credit card required

View all Actors
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.

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 mode

Node.js

Python

curl

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
  • 9 monthly users
  • 36.4% runs succeeded
  • 0.0 days response time
  • Created in Feb 2020
  • Modified about 3 years ago
Categories