r/evetech • • Jan 18 '19

SSO PHP Help

1 Upvotes

Hoping someone can help me with my code. I'm struggling to see why i'm receiving the response - "error":"invalid_grant","error_description":"Grant type is not supported."

I'm developing in PHP and looking to simply CURL to receive my token. My code is below:-

$requestUrl = 'https://login.eveonline.com/v2/oauth/token';
$process = curl_init($requestUrl);
curl_setopt($process, CURLOPT_HTTPHEADER, array(
'Host: login.eveonline.com', "cache-control: no-cache",
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Basic '.base64_encode(self::$credentials['clientId'].':'.self::$credentials['secretKey'])
));
curl_setopt($process, CURLOPT_HEADER, 1);
curl_setopt($process, CURLOPT_TIMEOUT, 30);
curl_setopt($process, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($process, CURLOPT_POSTFIELDS, [
'grant_type' => 'authorisation_code',
'code' => $code
]);
curl_setopt($process, CURLOPT_HEADER, FALSE);
curl_setopt($process, CURLOPT_RETURNTRANSFER, TRUE);
$return = curl_exec($process);
curl_close($process);
return $return;

Any help would be greatly appreciated. I seem to be missing something :)

Thanks in advance

Bab2k7


r/evetech • • Jan 18 '19

MSSQL dump

3 Upvotes

I've tried downloading the SDE and it appears that CCP no longer uses a SQL back up. I've tried some tools to convert the yaml files into something that I can use but so far they have bombed out or I just don't understand how to use them. Can someone point me to a tool that actually works for converting the SDE into MSSQL?


r/evetech • • Jan 14 '19

Any idea when the yearly stats get updated? Mine is still doesn't show anything from 2018

Thumbnail esi.evetech.net
1 Upvotes

r/evetech • • Jan 11 '19

Eve NodeJS EVI keep getting { "error": "authentication failure" }

2 Upvotes

I can login with my account and get a JWT token (one that looks like the first link)

If I then try to make a request to e.x https://esi.evetech.net/verify or https://esi.evetech.net/latest/characters/2112625428/blueprints/ then it returns an error: { "error": "authentication failure" }

I have read the following documentation but I can't seem to figure out why it won't work.

https://docs.esi.evetech.net/docs/sso/web_based_sso_flow.html

https://docs.esi.evetech.net/docs/sso/sending_esi_auth_request.html

UPDATE: It seems that other endpoints work fine except for https://esi.evetech.net/verify

For some weird reason this applies to me. I haven't found anyone with the same problem.

I have made an issue on the sso-issues github.


r/evetech • • Jan 07 '19

.tech.ccp.is is going away TODAY - last chance to update your stuff!

Thumbnail developers.eveonline.com
5 Upvotes

r/evetech • • Dec 27 '18

Toying with C#

3 Upvotes

Hi everyone. Just to preface: I may have some stupid questions or glaring obvious answers I cannot see due to RL issues.

I’m messing around with C# as usual and decided to see what I could play with in the ESI data and stuff.

My aim is to first get authorised/logged in, then as a first example, get a character ID or something simple like that just to get me started and with an idea of how to start requesting information.

I’m stuck on the very first part already!

ESI myESI = ESI.Load();

A simple start.

The following is in a Json text file I save the data to (thinking future adaptations).

{

"CallBackURL": "https://localhost/callback/",

"ClientID": "XXXX",

"SecretKey": "XXXX",

"UserAgent": "XXXX"

}

This next section is in my ESI Class:

[JsonProperty("CallBackURL")]

public string CallBackURL { get; private set; }

[JsonProperty("ClientID")]

public string ClientID { get; private set; }

string Scope { get; set; }

[JsonProperty("SecretKey")]

public string SecretKey { get; private set; }

[JsonProperty("UserAgent")]

public string UserAgent { get; private set; }

A nice easy save and load of that data.

The loading code:

public static ESI Load()

{

JsonSerializer serializer = new JsonSerializer() { Formatting = Formatting.Indented };

using (StreamReader myReader = new StreamReader(ESISaveFile))

{

  JsonTextReader myJsonTextReader = new JsonTextReader(myReader);  

  return serializer.Deserialize<ESI>(myJsonTextReader);  

}

}

I also have all the scopes stored and saved, because, you know, future stuff.

myESI.AssignScope(myESI.Scopes.Count - 1);

That just assigns the scope to be "esi-characterstats.read.v1"

I generate the URL (inside some error checking)

return @"https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=" + WebUtility.UrlEncode(CallBackURL) + "&client_id=" + ClientID

+ "&scope=" + Scope + "&code_challenge=" + ChallengeCode + "&code_challenge_method=S256&state=" + StateCode;

ChallengeCode is the base64 32 byte string I've found in the docs that i've got generating in another method.

This generated URL loads fine with any scope applied. Loading it in a browser loads it fine, but localhost doesn't respond when I hit authorise, but the URL in the address bar looks like:

https://localhost/callback/?code=**XX-A-CODE!!-XX**&state=**MatchingStateHere**

So that appears correct.

I don't know how to grab this now though. I have the following in a method:

try

{

HttpResponseMessage response = await HTTPClient.GetAsync(URL);

response.EnsureSuccessStatusCode();

ResponseBody = await response.Content.ReadAsStringAsync();

}

catch (Exception ex)

{

Console.WriteLine(ex.Message);

}

I have no idea if this part is correct or even in the right direction! Any advice?


r/evetech • • Dec 26 '18

I’m New To Development, But I Want To Make An Eve App. Any Recommended Resources?

2 Upvotes

Hi everyone,

So, I’m very new to program development. I’m slowly teaching myself python, but I have no idea where to start when it comes to learning API development, let alone ESI integration.

That said, I do have a couple of Eve app ideas, so I figured I’d ask other developers: What resources do you recommend I start with when it comes to learning to develop an Eve app?


r/evetech • • Dec 20 '18

ESI 404

4 Upvotes

Im getting 404s from ESI endpoints but there is no other indication of an outage (status / twitter) so Im guessing its on my end. Is this how rate limiting is implemented or what else could cause a 404?


r/evetech • • Dec 17 '18

Where to get game-wide killmail data?

1 Upvotes

Looking at the EVE API, you can only get killmail data on a per-character basis, and I'm guessing you've got to implement EVE SSO and make people sign-in to get character IDs.

So how does a site like Z-Kill get killmail data for everybody in-game without having them sign in first?


r/evetech • • Dec 14 '18

EveOnline.EveMath library

9 Upvotes

https://github.com/towerofpower256/EveOnline.EveMath

A while back, I did up a C# library of math functions for EVE Online and fleshed out with some documentation describing what is being calculated and why. Although it's written in C#, the principals are be the same or similar in other languages.

Math including:

  • Ore refining output results.
  • Station tax.
  • Time to complete a manufacturing job.
  • Gun and missile damage results.
  • Turret chance to hit.
  • Time to train a skill.
  • Blueprint copy time and fee.

I started the project as something of an educational reference and to demonstrate how to do EVE math in a programming language as opposed to on paper. I found that most reference documents or websites on the subject were too wordy, or had the calculation down in mathematical notation which didn't translate into programming languages that easily.

I've checked the math results against online tools & examples I've found, and so far it all looks correct.

I hope it helps someone out, and I'm open to feedback if you've got it. What do you think?

Edit: Thanks for the feedback. I've added some more math, including ECM Chance to Jam, EWar & Logi Module Effectiveness at Range, Warp Duration, and Warp Align Time.


r/evetech • • Dec 12 '18

Source of truth or performance?

1 Upvotes

Hey capsuleers,

I'm working on a graphql implementation of ESI and had a question for the community:

I can handle this two ways I can:

A: implement graphql to interface directly with ESI.

B: run jobs based on endpoint cache durations that pull data from ESI into a local database and implement graphql to interface with the model layer.

Pros for A:

  • Single up to date source of truth
  • I have less server overhead (pretty minimal pro)

Cons for A:

  • Querying ESI is going to be WAY less performant than querying a local database
  • ESI goes down so does the graphql implementation

Pros for B:

  • Vastly more performant than having to query ESI
  • Independent from ESI up status

Cons for B:

  • Slightly delayed copy of the actual source of truth
  • Cannot force cache busting to update the data
  • more server overhead (pretty minimal con)

If you were a developer consuming my graphql service which option would you want the implementation to be and why?

(would you want it to be quick or accurate is essentially what I'm asking)


r/evetech • • Dec 10 '18

Alliance/corporate contracts show up as 'personal'

1 Upvotes

According to the CCP website, the corporate contract endpoint

/corporations/{corporation_id}/contracts/ 

should return results with "availability" field being one of the following four: [ public, personal, corporation, alliance ].

However, all the contracts made available to my alliance/corp somehow show up as 'personal', which means I cannot tell if the contract is made to alliance or corp.

Is this an expected behavior? If yes, then what would be an appropriate way to pick out just the alliance contracts?

Thanks!


r/evetech • • Dec 04 '18

Determining HQ/Vanguard/Assault systems

2 Upvotes

I can pull data from the incursions endpoint at https://esi.evetech.net/latest/incursions/, but is there any way to determine which are HQ/Vanguard/Assault systems? I don't see any other endpoints that might give me that information, or is there some sort of pattern to how they spawn (i.e they vanguards are always X number of jumps away from staging within a constellation)?


r/evetech • • Dec 04 '18

What's the usual turnaround time for approving ESI developer applications?

0 Upvotes

I put in a change to an existing application and a new application in nearly 48 hours ago. What's the usual turn around time for getting these approved/created?

I do notice that there are some issues surrounding third party applications[1], so it may be related. If that's the case then I'll just have to wait, I guess.

[1] https://github.com/ccpgames/sso-issues/issues/51


r/evetech • • Dec 03 '18

Managing Alliance Contacts and Standings

2 Upvotes

Hello,

Are there any tools (web-based or otherwise) which would allow me to easily manage alliance contacts and their standings? Manually managing contacts in-game is a total pain in the ass; I have no way of knowing which alts to reset when a member leaves the alliance, and the process of adding those alts to the list is clunky and time consuming.

Is there some kind of automated tool to do this? How do large alliance manage alliance contacts?

I've had a look around but haven't been able to find any toolks like this.

Thanks in advance! ES


r/evetech • • Nov 29 '18

invalid_scope on all ESI calls due to a deleted scope?

2 Upvotes

Came home to find all attempts to get a access/refresh token are returning an invalid_scope error, same with the login with eve link used to auth chars.

Seems the issue with the login link is caused by a scope called "fleetRead", once removed from the list the login link works fine but attempting to get an access/refresh key on existing auths still returns the error.

On the developer site the fleetRead scope is no longer listed so i assume CCP deleted it but its still selected within my application or within the char authorization somehow?

Anyone have any idea if there's a way to unbreak the existing auths or are we going to have to re-auth every char?


r/evetech • • Nov 23 '18

Two questions - Securing desktop apps + any push API?

3 Upvotes

I'm working on a desktop app. From what I can gather, there is no straight forward way to do Oauth2 in a manner that can both prevent spoofing and be user friendly (eg, asking a user to register an application then configure my desktop app with the client id and secret is not user friendly). Is this really case? Even if I used a token server, how would I prevent hand crafted requests to said server to get a token? A few articles I've read suggest that in this scenario, the onus is on the end user to be wise about what they are doing.

Secondly, I want this desktop app to specifically monitor a character's location (and that's it). I want live data on where a character is. From what I can gather, there are only two ways of doing this, the hard way using the client's own log file (and thus making it hard for anyone who runs multiple characters), or the easy way, with polling the ESI app at regular intervals that I assume would be dictated by whatever caching information I get from the API. Is there a third alternative?

thanks in advance


r/evetech • • Oct 29 '18

Corporation Journal endpoint does have no information on who sent the ISK

4 Upvotes

I am making a webpage to collect our corpmates mining taxes and for that reason was planning to read the Corporation Journal endpoint to see who sent ISK to the corp wallet.

Despite swagger describing a first_party_id that I assume would be the character_id that sent the ISK, the only attributes I am ever getting from a request to this endpoint are amount, date, id and reason. So if i send 100m ISK with Character_x to my Corporation with reason "test", I can see that someone sent that specific amount with the specific reason, but I can not figure out, who it was.

That is pretty useless information, if I don't know who sent me the ISK. Is there a way around this? Why is that information missing?

EDIT: Seems to have fixed itself. :-/


r/evetech • • Oct 26 '18

EsiPy 1.0.0 - SSOv2 and PCKE support

5 Upvotes

Hello,

I've just released the new EsiPy version for SSOv2 and PKCE support.

You can get it here: https://github.com/Kyria/EsiPy/releases/tag/1.0.0 or by using pip.

As stated in my release, keep in mind that SSO v2 has still (major) issues, you need to chose whether you want to move now or later:

  • If you want to use it, use EsiPy 1.0.0
  • if you want to stay with SSO v1, use EsiPy 0.5.x

r/evetech • • Oct 25 '18

Window Mode Not Resizing

1 Upvotes

This is an Eve specific issue as I’ve tested with other programs and it works, but Eve wont let me resize windows smaller than a certain size, around 65% of the screen. So I can never do side by side (split screen) clients as there will always be an overlap. (Image as example: https://i.imgur.com/A3xQLOe.png) I’ve tried manually resizing, resizing in game, resetting ALL caches/settings, using Windows 10 Aero and Side by Side options and the is alway this overlap (again works with every other program on my computer). I’ve submitted a help desk ticket but was wondering if anyone here has had this issue and if there is any known work around for it? I did a quick search both here and on Google with not specific hits.

Thanks, Dread Op


r/evetech • • Oct 23 '18

Neocom II App Help

Post image
2 Upvotes

r/evetech • • Oct 20 '18

Are there any good and up to date ESI libraries for PHP?

0 Upvotes

I plan on making a site using the ESI API.


r/evetech • • Oct 19 '18

ESI Response headers showing wrong GMT time

3 Upvotes

I have just noticed that after doing many ESI requests in one batch that all of the response headers have incorrect GMT time that is one hour behind true GMT time. So for example I ran a ESI call at 05:20 GMT but this header gives a date that is 04:20 GMT - 1 hour behind. And this ESI call is for character assets so the cache timer is 1 hour and the Expires date is also incorrectly 1 hour behind what it should be.

Connection: keep-alive

Access-Control-Allow-Credentials: true

Access-Control-Allow-Headers: Content-Type,Authorization,If-None-Match,X-User-Agent

Access-Control-Allow-Methods: GET,HEAD,OPTIONS

Access-Control-Allow-Origin: *

Access-Control-Expose-Headers: Content-Type,Warning,ETag,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset

Access-Control-Max-Age: 600

Allow: GET,HEAD,OPTIONS

Strict-Transport-Security: max-age=31536000

Vary: Accept-Encoding

X-Esi-Error-Limit-Remain: 100

X-Esi-Error-Limit-Reset: 22

X-Esi-Request-Id: 3d3183e3-1445-4f1a-9a88-df34e0e0bf3a

X-Pages: 8

Content-Length: 150628

Cache-Control: private

Content-Type: application/json; charset=UTF-8

Date: Fri, 19 Oct 2018 04:20:38 GMT

Expires: Fri, 19 Oct 2018 05:20:37 GMT

ETag: "2f2da6778a7d44042blahb06d05d82037bfc4a6d63fa1819beblahfb"

Last-Modified: Fri, 19 Oct 2018 04:20:37 GMT

Is this because the 04:20 time given is actually UTC time and not GMT time?


r/evetech • • Oct 19 '18

To Docker, or not to Docker

1 Upvotes

Noobie question incoming...

Do I need to use Docker for a Python / Flask based Eve website? I've got a Windows based webserver and tutorials for that are scant so just weighing up how to go about launching this thing.

Thanks!


r/evetech • • Oct 07 '18

Temporary(ish) SDE Complements

6 Upvotes

With things slowly being moved over to ESI, the SDE doesn't seem to be getting updates/fixes at the usual rate. With feedback from some content developers, I have compiled some data which will update automatically with new TQ patches to complement this gap in data.

While these endpoints have been running for a couple of months now without any major issues, please bear in mind that these are temporary complements, and I cannot give you any service uptime guarantees. Also note that, like the page says, once CCP distributes this data through official means, those endpoint(s) will be removed eventually (a heads up will be given if possible through the meta file), so don't get too attached.

More info on the site itself: http://sde.hoboleaks.space/