Jump to content


  • Content count

  • Joined

  • Last visited

  1. Hello, I am mainly a database and desktop application developer, so REST API is new to me. When using the below C# code I keep getting error 401 - Unauthorized back. Is the code even remotely close to trying to obtain a valid token? I added XXXX instead of the actual credentials. Do you have a full example like below that will get a token back? string myJson = "{'Username': 'DAXXXXXXX','Password':'XXXXXX','AppKey':'K.XXXXXX'}"; using (var client = new HttpClient()) { var response = await client.PostAsync( "https://ciapipreprod.cityindextest9.co.uk/TradingAPI/session", new StringContent(myJson, Encoding.UTF8, "application/json")); }