Identifying yourself during data exchange

Identification is performed by means of an HTTP header.

The used method is HTTP Basic Authentication.

In each HTTP request, the header must contain the information allowing the Marketplace to authenticate itself when connecting to Marketplace Web Services.

Description of HTTP headers:

Headers Description Values to use
Accept Determines the format of the contents that will be returned by the server.

REST architecture that allows to perform data exchange in JSON format.

'Accept: application/json'
Authorization: Description Identification token according to the "Basic Authentication over HTTPS" principle. Consists of an identifier and a password of the API user separated by a ':', both encoded in Base64. 'Authorization: Basic YWRtaW46YWRtaW4='
Content-type Determines the format of the contents sent to the server. 'content-type: application/json'

See the table in the Web Service resources chapter to see the methods to be used according to each resource.


The steps for building headers are:

  1. Use the Basic Authentication method.
  2. Specify the used method in the Authorization header: Basic followed by the login and the password (encoded in Base64) separated by a ':'.
  3. Encode the obtained result in Base64.
  4. Add the chain into "Basic".
    Do not forget to add a space after Basic.

  • Example cURL:
    $ curl '' -H
    'Authorization: Basic YWRtaW46YWRtaW4=' -H
    'Content-Type: application/json' -H 'Accept: application/json' --data
  • Example of a complete request in Python:
    r =
    <target url>,
    data=<json data>,
    auth=(<api login>, <api password>),
    headers={'content-type': 'application/json'},
  • Example of a request in .NET:
    var myURL = ""
    HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(myURL);
    myHttpWebRequest.ContentType = "application/json";
    myHttpWebRequest.Accept = "application/json";
    myHttpWebRequest.Method = "post";
    string authInfo = userName + ":" + userPassword; 
    authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
    myHttpWebRequest.Headers["Authorization"] = "Basic " + authInfo;