Orchestrator API calling using RESTsharp

  hi all,

i am using below code, though my credentials are correct and i can use them using postman, but here after using this it says invalid credentials

please help
{
var client = new RestClient(“https://orchestratorURL/api/account/authenticate”);
var request = new RestRequest(Method.POST);
request.AddHeader(“cache-control”, “no-cache”);
request.AddHeader(“content-type”, “application/json”);
request.AddParameter(“loginModel”, “{\n “tenancyName”: “xx”,\n “usernameOrEmailAddress”: “xx”,\n “password”: “xx” \n}”,ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);

        Console.WriteLine(response.Content);


        if ((int)response.StatusCode == 200)
        {


        }
        else
        {

        }
        }
        catch (Exception e)
        {
            throw e;
        }

Thanks

Now we have lot of steps included to call the orchestrator API @armamidwar. Have you finished all those steps? Actually, you need to pass bearer token along with the above request

Thanks Hareesh for replying ,
this is the first the step - Authentication

Not at all, you have many other steps to do before. Here is the step by step process

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