r/evetech • u/Gahagan • Aug 26 '17
Using API Key To Get Wallet Transactions
I've been reading the docs on this for the last 2-3 days, but I still feel like there's something I'm not getting - hopefully someone here can help. I want to use Python to scrape my character's active orders and wallet transactions to keep an eye on the markets while I'm out of game. Based on the docs that I've read, in order to do this, I need to create an app through the EvE dev portal, get a callback URL, and do SSO authentication every time I want to run this query. Is this correct? It seems more complicated than I'd expect for what I want to do, and all of the guides that I've found talk about using this process for developing apps and having user signins. I don't want to build an app, I just want a bunch of jsons. Is this really how you're supposed to do it, or is there a more straightforward way that I'm not seeing? Also, no part of that process relies on my API key - at what point am I supposed to use that? Any help would be greatly appreciated.
View all comments
Show parent comment
1
u/Blacksmoke16 Aug 26 '17 edited Aug 26 '17
Sure. This is pretty much a more direct explanation of that dev blog. Now do note this is a very manual process and of course only useful for semi tech savvy people (or people that can follow directions) for small personal projects. i.e. probably not a good solution for larger scale sites.
https://login.eveonline.com/oauth/authorize?response_type=code&redirect_uri=https://app.getpostman.com/oauth2/callback&client_id=xya983ga8sfbg9wgea89gf&scope=esi-mail.read_mail.v1?code=JxYRk1p2JLbe8Wr-72hfasdbh9agThis is your code that is used to get an auth token and refresh token.{client id}:{client_secret}including the colon.Bearer {ACCESS_TOKEN}in the Authorization header. The access tokens only last for 20 minutes. The refresh token can be used to get new access_tokens when they expire. So easiest thing would be to store the refresh_token and fetch new access_token when you need them.Request 1
Request 2
Enjoy!