Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the session cookie #1

Closed
wimglenn opened this issue Dec 3, 2016 · 0 comments
Closed

How to get the session cookie #1

wimglenn opened this issue Dec 3, 2016 · 0 comments

Comments

@wimglenn
Copy link
Owner

wimglenn commented Dec 3, 2016

Puzzle inputs differ by user. For this reason, you can't get your data with an unauthenticated request. Here's how to get your session cookie for aocd to use:

  1. Login on AoC with github or whatever
  2. Open browser's developer console (e.g. right click --> Inspect) and navigate to the Network tab
  3. GET any input page, say adventofcode.com/2016/day/1/input, and look in the request headers.

It's a long hex string. Export that to an environment variable AOC_SESSION. Or, if you prefer more persistence, you can write it to a plain text file at ~/.config/aocd/token.

aocd_cookie

@wimglenn wimglenn closed this as completed Dec 3, 2016
amhk added a commit to amhk/advent-of-code that referenced this issue Dec 14, 2020
Teach the template script to download the day's input data if the
environment variable AOC_SESSION is set to the AOC site's cookie's
session value.

Example usage:

  $ AOC_SESSION=<secret> ./scripts/new-day.sh

To get your session value, check your browsers cookies for the AOC
domain, or follow the tutorial at [1].

[1] wimglenn/advent-of-code-wim#1

Signed-off-by: Mårten Kongstad <marten.kongstad@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant