Periodically checking CharaterOwnerHash


(MJ Maverick) #1

Is there a way of holding onto the hash in SQL and checking it at a later date with a simple call? Or do I have to go jumping though a 12 stage hoops hurdle course of refresh token and what not?


(Steve Ronuken) #2

You need to use the refresh token, to get an access token, to use the verify endpoint. (so a 3 step process. The same three step process to use any authenticated endpoint)


(MJ Maverick) #3

Bugger, more effort than it’s worth at the moment then. :confused:


(Brock Khans) #4

Effort? Write it once, and then it just works in like < 1 second…


(MJ Maverick) #5

Still learning Curl with PHP tbh, only today built a script that gets all the public information and displays it.


(Brock Khans) #6

https://github.com/fuzzysteve/eve-sso-auth May help you out. Uses curl, stores stuff in a DB for basic authing/storing of info.


(MJ Maverick) #7

That’s exactly what I’ve been using lol, I just haven’t come across an example of refreshing yet. Nor do I know how long the refresh last and if there’s anything I need to know that might stop it working etc.


(Brock Khans) #8

When you request tokens the access_token is good for 1200 seconds or 20 minutes. Once that expires you now have to use the refresh_token to request a new access_token which is then good for another 20 minutes.

Getting started I’d look over all the resources on Tips for a developer starting out with ESI!


(MJ Maverick) #9

Ah, thank you.


(Steve Ronuken) #10

I’d suggest looking at Guzzle for php. It wraps up curl into something a bit nicer.


(Brock Khans) #11

I started learning using that curl repo and then learned to convert it into using Guzzle. https://github.com/skiedude/evestructures/blob/master/app/Http/Controllers/CharacterController.php#L72 is my implementation of using Guzzle (which isn’t the bestly coded, but it fills my needs)


(system) #12

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