Home getting eBay Access token using delphi
Reply: 0

getting eBay Access token using delphi

user1345
1#
user1345 Published in April 26, 2018, 5:11 pm

Having problem getting eBay access token using delphi.

When i run it and click on button i should get access token but im getting

Exception EHTTPProtocolException 'HTTP/1.1 401 Unauthorized'

when i click continue. Message dialog appeares with meessege

{"error":"invalid_client", "error_description":"client authentication failed"}

My delphi code:

procedure TForm5.btn1Click(Sender: TObject);
var
 vClientId, vClientSecret : string;
 vBase64 : String;
 vRuNames : string;
begin
  vClientId:='jackjump-xxxx-SBX-15d7a0307-68d66d5a';
  vClientSecret:='SBX-5d7a03073f13-cb20-4a72-b71e-4e53';
  vBase64:=TNetEncoding.Base64.Encode(vClientId+':'+vClientSecret);
  vRuNames:='jack_jumping-jackjump-xxxx--tbccomu';

  RESTRequest1.Method:=rmPOST;
  RESTRequest1.Resource:='/identity/v1/oauth2/token';    
  RESTRequest1.AddParameter('Authorization', 'Basic '+vBase64, pkHTTPHEADER);
  RESTRequest1.AddParameter('grant_type','client_credentials', pkREQUESTBODY);
  RESTRequest1.AddParameter('redirect_uri',vRuNames, pkREQUESTBODY);
  RESTRequest1.AddParameter('scope','https://api.ebay.com/oauth/api_scope', pkREQUESTBODY);


  RESTRequest1.Execute;
  ShowMessage(RESTResponse1.Content);
end;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.326042 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO