Social Connect Session
social_connect_sessionAuthenticates to Scratch with username/password, session token, or browser credentials to enable user-scoped actions. Stores session for reuse when needed.
Instructions
Login to the Scratch site using set login details.
You may either provide a path_to_env, a scratch_username and scratch_password, or a scratch_session_id, or a browser_name (optional).
If none is provided, it will fallback to logging in via the user's installed browser.
Sessions are remembered across restarts by default, so this usually only needs to be called once per account. Check social_list_sessions first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remember | No | Save the session id to disk so the login survives a server restart. Only the session id is stored, never the password. Pass False for a login that lives only as long as this process. | |
| path_to_env | No | Path to a .env file containing SCRATCH_USERNAME and SCRATCH_PASSWORD environment variables, or a SCRATCH_SESSION_ID variable. If not provided, the below values must be instead. | |
| browser_name | No | If none of the above are provided, it defaults to logging in via browser. Either pass a preferred browser to fetch the cookie from, or leave it empty to default to autodetect any installed browser and uses those credentials. | |
| scratch_password | No | The password to authenticate with. | |
| scratch_username | No | The username to authenticate with. | |
| scratch_session_id | No | A session token from Scratch to use when authenticating. This value can be obtained from any logged-in browser by fetching the value of the cookie `scratchsessionsid`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |