Jump to content

Calling a service in the API Sandbox from C#


Recommended Posts

I am trying to call an API method in the Sandbox. I have downloaded the C# exampel code from GitHub and run the following (The API Key is from the GrahamC pre-built account)

//Create a new XmlService helper object from the Hornbill GitHub example 
var xmlMcService = new XmlmcService("https://api.hornbill.com", "xmlmc", "dav");

//Set the API Key from the GrahamC account
xmlMcService.APIKey = "006c10c54cc244ea9bdcb78403459fb8";

//Invoke the getSessionInfo method
xmlMcService.Invoke("session", "getSessionInfo");

The invoke method fails with the following error:

The XMLXC request message specifies a different service than the one specified in the request URI

I can't see anything wrong with what I have done and my reading of the documentation is this should work. Has anyone managed to call anything in the Sandbox API because I just don't seem to be getting anywhere.

Also, if you are replying does anyone know why the shiny new product still does not support standard Web API / REST?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...