SData authentication
All SData requests must include authentication data (user name and password) in their headers. SData access is subject to the same territory model as Sage CRM users. Profile security (CRUD rights per entity) and access rights depend on the user type, for example, administrator or non-administrator.
Make sure that you use Base64 encoding to encrypt the user name and password supplied in the HTTP request header with X-Sage-Authorization line included, as shown below:
request.Headers.Add("X-Sage-Authorization", "Basic "+ Convert.ToBase64String(Encoding.ASCII.GetBytes(this.userName + ":" + this.password)));
For better security, we recommend that you send authentication requests via HTTPS.