Skip to content

Getting A Refresh Token

Leon Jacobs edited this page May 4, 2018 · 9 revisions

SeAT

Getting A Refresh Token

When using Eseye, an existing application that makes use of EVE SSO is most probably already getting refresh tokens for characters and storing it. This token together with your applications Client ID and Secret Key is all that is needed to use the library (and appropriate scopes).

However, if you don't have this (which may be for many reasons), Eseye includes a small helper that will let you easily generate one.

tokengenerator

After you have installed Eseye, a bash script that will start a small web server exists in vendor/bin/tokengenerator. This script will serve a simple index.php file geared towards helping you get a refresh token for your character.

To run the helper, cd to your projects root directory and run vendor/bin/tokengenerator:

tokengenerator

Next, browse to the url mentioned in the output (http://127.0.0.1:9009 in my examples case):

landing

create the application on the developers site

Great. As you can see, we need the Client ID and Secret Key. These can be obtained by creating a new application on the EVE Online Developers site. When you create the application, make sure you tick Authenticated API Access so that you can pick the scopes you want for your application.

You will also need to provide the callback url on the developers site. This url is auto generated for you on the token generator page. So, just copy and page that one in. An example url is: http://127.0.0.1:9009/index.php?action=eveonlinecallback

exampleapp

You now have the Client ID and Secret key you need on the token generator.

prepare the login button

Fill in the Client ID and Secret Key you have in the application you have just created. Be sure to select the correct scopes you want as well, and finally press the Generate Login button.

generatelogin

login to eve online and authorize

Press the Login with EVEOnline button and make sure you are on the https://login.eveonline.com page and enter your EVE Online credentials. Once logged in, you will get the option to choose your character, confirm the authentication scopes, and finally press the Authorize button at the bottom.

eveoauthorize

Once authorized, the script you are hosting will receive the callback, and then make a call back to the EVE Online domain to verify and receive your refresh token.

get the refresh token

Once the process is complete, you will see the page with your new refresh_token. Be sure to copy the entire line as this can be a little long.

refresh