unit AutenticacaoEndpoints;

interface

uses
  Classes, Conexoes, IdHTTP, XSuperObject, IdGlobal, Vcl.Dialogs, System.SysUtils, MainCode;

procedure OauthToken;

implementation

threadvar
  AccessToken : iSuperObject;

procedure OauthToken;
begin
  try
    AccessToken := Conexoes.OauthToken;
    MainCode.MainFrm.MemoResponse.Text := 'Autenticação Realizada com Sucesso!';//AccessToken.S['access_token'];
    except
    on E: Exception do
    begin
      MainCode.MainFrm.MemoResponse.Text := 'Erro na Requisião GET /OAuth/Token';
    end;
  end;
end;

end.
