Hallo,
also der Schlüssel ist korrekt! Ist die
XML Formatierung in der StringList so richtig?
Liegt vielleicht hier der Fehler?
Delphi-Quellcode:
function ExecuteAPI:
string;
var
http: TIdHttp;
params: TStringList;
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>11202020</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('
</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));
finally
params.Free;
end;
end;