How to use refresh_token?

Hi all,

I’m working with ESI interfaces as following:

(here for example the assets of my character)

It work well but the validity of a token is only 20 minutes. I read somewhere that a refresh token is always valid. It will be much better for me. Can I use a url with the refresh_token instead of token. And if yes, can you give me the exact form please ?

Thanks for help.

Not quite.

You use your refresh_token in an HTTP POST request to get a new access_token.

Below is a sample Postman request on how to use the refresh_token. The request is very similar to the one used to exchange a code for an access_token, just with a different body.

POST /oauth/token HTTP/1.1
Host: login.eveonline.com
Accept: application/json
Authorization: Basic {YOUR_BASE64_ENCODED_CLIENT_ID_AND_CLIENT_SECRET}
Content-Type: application/json
Cache-Control: no-cache

{
    "grant_type":"refresh_token",
    "refresh_token":"YOUR_REFRESH_TOKEN"
}
1 Like

Thanks for your response. But that’s not my question … :slight_smile:
I already have the refresh_token. Postman gives me the token and the refresh_token.

My question is : can i use the refresh_token in a url ?
For example, I have already try :
https://esi.tech.ccp.is/latest/characters/<char_no>/assets/?&refresh_token=<ref_token>
but it does not work.

Thanks !

No.

Again that is not the role of a refresh_token. You use the refresh_token to get a new access_token to use in auth’d requests.

2 Likes

oki. thanks even if the response is not convenient for me…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.