Where to find these (on a computer, in Firefox/Chrome while logged into ESPN Fantasy):
League ID — it's in your league page URL: leagueId=XXXXXX.
Cookies — press F12 → Storage (Firefox) or Application (Chrome) → Cookies → fantasy.espn.com. Copy the values of espn_s2 and SWID (SWID includes the curly braces).
These stay on this device and are only ever sent to ESPN (via this app's own domain) to read your league. The app cannot make picks or change anything.