APIs Authorization http header
Add API-token authorization.
Demo SiteDealer Code | tokenId |
Username | username |
Password | password |
c#
Sample:
//1. Set Authentication HttpClient client = new HttpClient(); string authData = "username:password"; string authHeaderValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(authData)); client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic" authHeaderValue); //2. Set TOKENID in Header client.DefaultRequestHeaders.Add("TOKENID" "tokenId");