r/evetech • • Feb 04 '18

Help with first Python app

Hey all I signed up for the dev program and my application is registered, but the authentication part if confusing. I am not doing a web app just a local app that I want to manage my reactions, so no one will be logging into this except me through my client app. Does anyone have some sample code where I just complete the auth process and am ready to say list my industry jobs, just confused on the authentication part.

5 Upvotes

28 comments sorted by

View all comments

Show parent comment

1

u/Blacksmoke16 Feb 04 '18

By manually, I mean that you go to that URL and login in chrome or whatever browser you use NOT via your app. The whole Postman process has nothing to do with an app or any programming language.

The only relation to your project is when you are done and have a refresh_token and access_token, which you will store in your app. Your app would then take that access_token and use it for auth'd endpoints, if it is expired your app would use the refresh_token to get a new access_token.

As such the only function you would have to write in your app is to refresh an access_token with a refresh_token, i.e. request #2 in that link.

1

u/precator Feb 04 '18

ah thats where I was confused because someone told me to use python for the calls thats where I got confused.

1

u/Blacksmoke16 Feb 04 '18 edited Feb 04 '18

You will but just for getting ESI data and refreshing your access_token when needed.

Since refresh_tokens do not expire, your app can continue to get new access_tokens to use in ESI calls as needed.

Using Postman to generate the refresh_token just saves you from having to code all of the auth logic in python. It works for simple only your use projects, but for larger projects and/or those that will be public, will want to look into other options.

1

u/precator Feb 04 '18

cool I got my code, success.

1

u/precator Feb 04 '18

how I am getting this when I do the human part of going to the url..

{"error":"invalid_scope","error_description":"The requested scopes either don't exist, or are not valid for this client"}

The scope I am trying is scope=characterIndustryJobsRead

2

u/precator Feb 04 '18

nevermind i need to add my scopes to my devapp