panoramicdata / ServiceNow.Api

ServiceNow REST API nuget package
MIT License
21 stars 18 forks source link

Value for account in your example #18

Closed thedavegray closed 1 year ago

thedavegray commented 1 year ago

Hello

In your code example you show three arguments to the console application; account, username and password.

var account = args[0];

Can I ask what this form this value you should be? I assumed it was the domain https://mycompany.service-now.com but this is not correct.

I have tried with

I know my domain, user and pass are correct as I can query using Postman.

But get this "{"No such host is known. (https:443)"}"

Be grateful for any advice as quite under the cosh to get this done :-(

thedavegray commented 1 year ago

Ah ok, so looking at the class/method ServiceNowClient

it's just your company name

string uriString = ((_options.Environment != ServiceNowEnvironment.GCC) ? ("https://" + account + ".service-now.com") : ("https://" + account + ".servicenowservices.com"));

Not entirely sure why docs could simply state that.

rolandbanks commented 1 year ago

So it's all working?