FireMonkey Android app "HTTP Token: Access denied" when consuming Web service

  

I have created FireMonkey android app to consume Web service using Rest components.
I have added the credentials(Tokens) in HttpRequest Header Parameter. But still I am getting “HTTP Token: Access denied.” Any one help me to fix this.

Edit:
I am using third party Rest API like “http://172.24.142.23:3000/api/v1/home/filters”
This is having header parameters “Authorization : Token eecd6f85b3ce9ba151767aa869083e63”.

var
myThread : TRESTExecutionThread;

procedure TForm1.DoFetch;
var
Response : String;
begin
Response := RESTRequest1.Response.Content;
Memo1.Lines.Add(Response);
end;

procedure TForm1.GetClick(Sender: TObject);
begin
AniIndicator1.Visible := true;
AniIndicator1.enabled := true;
mythread := RESTRequest1.ExecuteAsync(DoFetch,true,true);
mythread.OnTerminate := threadTerminated;
end;

I have added those authentication values in TRestRequest’s header parameters.

Comments are closed.