Hi,
I am trying to do some create users requests towards the sandbox. I have api key created for that purpose. There is my code:
var almaSandboxUrl = “https://sandbox02-eu.alma.exlibrisgroup.com/almaws/v1/users”;
HttpClient client = new(); StringContent newUserContent = new StringContent(userToCreate, Encoding.UTF8, “application/json”);
client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(“application/json”)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“apikey”, almaSandboxApiKey);
var response = await client.PostAsync(almaSandboxUrl, newUserContent); var jsonResponse = await response.Content.ReadAsStringAsync();
I’ve tried with query parameter as well, still the same error: 401 – Not Authorized.
Please see https://developers.exlibrisgroup.com/alma/apis/ Access should be done via the API Gateways. You configure the API-key to access your prod or sand environment. Ori