Some of the APIs we use require authentication via being logged into an account.
Everything is set up such that none of these will be committed to any repositories, instead at the base directory of the repository, place a file called .env
, with the following:
AF_SESSION_ID=""
SC_ACCESS_TOKEN=""
You put the values of your authentication inside the quotation marks to the right of the equals sign. Instructions on obtaining these are below.
Note that the .env
file is .gitignore
'd so only you can see it.
Either use the chrome extensions or do the following:
- Login to AFL Fantasy using the Google Chrome
- Open Chrome Devtools (shortcut: F12)
- Click on the 'Application' tab
- Click/expand 'Cookies'
- Under Cookies, click on 'https://fantasy.afl.com.au'
- Click on 'session' and the value should appear in the box below (you can copy and paste this)
Follow the steps below:
- Login to Supercoach the Google Chrome
- Open Chrome Devtools (shortcut: F12)
- Click on the 'Application' tab
- Click/expand 'Local storage'
- Under Cookies, click on 'https://www.supercoach.com.au'
- Click on 'VMLS:news:accessToken' and the value should appear in the box below (you can copy and paste this)