These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Difficulties with esi-characters.read_contacts.v1

Author
Zunnai Mishi
Royal Amarr Science Institute
Royal Amarr Space Industries
#1 - 2017-03-17 22:02:14 UTC
Hi,
I'm trying the first steps with esi and oauth and... I'm clearly missing something when trying to get into it running.

(Text as gist: https://gist.github.com/janhkrueger/a4989e9d7764bba470f73aa32f62e23f )

App is set up and I can request clones, corphistory and others.

Authorising the App
https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%2Fcallback&client_id=[clientID]]&scope=esi-characters.read_contacts.v1%20esi-characters.write_contacts.v1&state=uniquestate123



gives me

http://localhost/callback?code=[Authorization code]&state=uniquestate123


Getting the AuthToken

curl -v -X POST --header "Authorization: Basic [base64]]" --header "Host: login.eveonline.com" --header "Content-Type: application/x-www-form-urlencoded" --data "grant_type=authorization_code&code=[Authorization code]" https://login.eveonline.com/oauth/token



And there I get the access token, all fine.

{"access_token":"[access token]","token_type":"Bearer","expires_in":1200,"refresh_token":"[refresh token]"}



Then I'm trying to get a list of my contacts. To get these, I use the curl string I got from https://esi.tech.ccp.is/latest/#!/Contacts/get_characters_character_id_contacts and inserting my token and charid

curl -i --compressed -X GET --header 'Accept: application/json' --header 'Authorization: Bearer [access token]' 'https://esi.tech.ccp.is/latest/characters/[character ID]/contacts/?datasource=tranquility&page=1'


But I only get a HTTP/1.1 500 Internal Server Error
{"error": "Action failed"}


I even have tried to wait a few seconds and then send the same request because in the forums a guy wrote esi is somewhat unstable to him.
Has anybody of you an idea what I'm doing wrong?




Blacksmoke16
Resilience.
#2 - 2017-03-17 22:43:28 UTC
I just copy pasted your curl string, put in my charID and token and it worked fine.

So I dunno.
croakroach
24th Imperial Crusade
Amarr Empire
#3 - 2017-03-17 23:07:03 UTC
From discussions, Action Failed is usually something from the EVE Cluster failing.

I would make sure you don't have any strange contacts like NPC's, etc.
Zunnai Mishi
Royal Amarr Science Institute
Royal Amarr Space Industries
#4 - 2017-03-18 15:06:16 UTC
Tried it and yes... NPCs as contacts seems causing the action failed.

Thanks to you both!
Blacksmoke16
Resilience.
#5 - 2017-03-18 15:38:15 UTC
Make an issue on the ESI github page, as I'm pretty sure that it shouldn't just error like that:

https://github.com/ccpgames/esi-issues/issues
Zunnai Mishi
Royal Amarr Science Institute
Royal Amarr Space Industries
#6 - 2017-03-20 10:44:53 UTC
Christoper Khan
Cell Anomaly
#7 - 2017-03-24 20:32:26 UTC
Confirming I have this same issue on all standings write calls the last days, even on swagger api demo.
Blacksmoke16
Resilience.
#8 - 2017-03-24 20:56:18 UTC
croakroach wrote:
From discussions, Action Failed is usually something from the EVE Cluster failing.

I would make sure you don't have any strange contacts like NPC's, etc.



Check to see if this is the case for you as well
Christoper Khan
Cell Anomaly
#9 - 2017-03-25 16:36:01 UTC  |  Edited by: Christoper Khan
Blacksmoke16 wrote:
croakroach wrote:
From discussions, Action Failed is usually something from the EVE Cluster failing.

I would make sure you don't have any strange contacts like NPC's, etc.



Check to see if this is the case for you as well


Confirmed, I have a system added as contact. Odd, I cant remove it in Eve.

EDIT: It seems its possible to add contact with id 0 (which is a system tag), and it totally breaks both Eve and contact API.
Fix is easy tho, I used the swagger interface and send request for delete of item 0 (type it as [0] in swagger).

CCP should avoid it being possible to add contacts that are not persons/corps/alliances
Blacksmoke16
Resilience.
#10 - 2017-03-26 02:34:18 UTC
https://github.com/ccpgames/esi-issues/issues

Make an issue in the ESI Docs so they are aware of it.