Hallo,
immer die gleiche Meldung
was könnte ich noch ausprobieren?
Zitat:
{"status":"error","errors":["unauthorized"]} 16.08.2016 , 13:38:46
Delphi-Quellcode:
function ExecuteAPI:
string;
var
http: TIdHttp;
params: TStringList;
iRun: Integer;
begin
try
http := TIdHTTP.Create(
nil);
params := TStringList.Create;
params.Add('
<?xml version="1.0" encoding="UTF-8"?>');
params.Add('
<fireboardOperation version="1.0">');
params.Add('
<uniqueId>123456789</uniqueId>');
params.Add('
<basicData>');
params.Add('
<externalNumber>OF120131</externalNumber>');
params.Add('
<keyword>F2</keyword>');
params.Add('
<announcement>Wohnungsbrand</announcement>');
params.Add('
<location>Test, Teststraße 1</location>');
{params.Add('<geo_location>');
params.Add('<latitude>123456</latitude>');
params.Add('<longitude>654321</longitude>');
params.Add('</geo_location>');}
params.Add('
<timestampStarted>');
params.Add('
<long></long>');
params.Add('
</timestampStarted>');
params.Add('
<situation>Notruf</situation>');
params.Add('
</basicData>');
params.Add('
</fireboardOperation>');
http.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(
nil);
Form3.Memo8.Lines.Insert(0,http.Post('
https://login.fireboard.net/api?authkey=123456789&call=operation_Data', params)+'
'
+ FormatDateTime ('
dd.mm.yyyy , hh:nn:ss', Now));
//ShowMessage(params[iRun]);
finally
params.Free;
end;
end;