Hello,
I have some prob with authenticated request to ESI.
Example :
GET https://esi.evetech.net/latest/characters/Character_Id/skills/?datasource=tranquility
Base Url => https://esi.evetech.net
Route => /latest/characters/Character_Id/skills
public static string GetAuthenticatedInformation(string BaseURL, string Route)
{
string HeaderAccessToken = "Bearer+".Replace("+"," ")+ GetCurrentToken();
var client = new RestClient(BaseURL);
var request = new RestRequest(Route);
request.AddParameter("datasource", "tranquility");
request.AddHeader("Authorization", HeaderAccessToken);
var response = client.Get(request);
return response.Content;
}
Reponse => {“error” : “authentication failure”}
if I try with param
string HeaderAccessToken = "Bearer+".Replace("+"," ")+ GetCurrentToken();
var client = new RestClient(BaseURL);
var request = new RestRequest(Route);
request.AddParameter("datasource", "tranquility");
request.AddParameter("token", HeaderAccessToken);
=> latest/characters/Charcter_Id/skills/?datasource=tranquility&token=%20eyJhbGciOiJSUzI1N…
Reponse => {“error” : “authentication failure”}
On Postman :
I use Desktop/Mobile Oauth 2.0 Flow
on the other hand, no problem to refresh the token
I also tried with
string HeaderAccessToken = "Bearer+".Replace("+"," ")+ GetCurrentToken();
var client = new RestClient(BaseURL);
var request = new RestRequest(Route);
request.AddParameter("datasource", "tranquility");
client.Authenticator = new HttpBasicAuthenticator("Bearer", HeaderAccessToken);
var response = client.Get(request);
return response.Content;
Maybe a token too long?
My token with the full scope is 4079 characters
Any Idea?