AuthorizationException when importing products

I am creating a connection between a PIM and Litium but i am getting a 401 AuthorizationException when i am tryint to import products through Litium connect. I am retrieving a JWT that i am using in the import Post request. I get the same result when i try to do the import in Postman.
Happy for any suggestions

this is what i do:

            var restClient = new RestClient("url");
            restClient.Timeout = -1;
            var request = new RestRequest(Method.POST);
            request.AddHeader("Authorization", "Bearer " + jwtToken);
            request.AddHeader("Content-Type", "application/json");
            string json = JsonConvert.SerializeObject(root);
            request.AddParameter(json, ParameterType.RequestBody);
            IRestResponse response = restClient.Execute(request);

Litium version: [7.6.1]

Did you create the service account user in BO?

Also, did you connect it to a user that has access to Products? From the link above:

In Litium backoffice, Control panel > System settings > service accounts, add a service account and associate it with an existing user. The associated existing users user groups will ultimately control the amount of access this service account user would have.

Merci. I had not connected the service account to a user with the correct acces. Now this error is gone (however, i still don’t get any products to Litium, this time due to a json parsing error )

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.