Permission error when accessing webapi from serverside app or REST client.

I am unable to get or post to web api urls from my application or from Postman like clients. For example I can go to 'https://orf-cogenaf.ors.nih.gov/piwebapi' in my browser but not from my node application or from tools like Postman. When i try to go to that url from my REST client, I see the error - "401 Unauthorized" What is the nature of this problem and how can I fix it?

 

Unlimately, in the application I am developing, I would like to be able to post to the 'batch' endpoint

 

Parents
  • You probably only have Windows Authentication enabled. Unless you're running your NodeJS application as a Windows user, you're not going to be able to authenticate. And even then, I don't think there are "default" credentials like there is in C#. You'll either need to authenticate using basic auth, or build an integration to be able to authenticate as a Windows user. There's different ways to do it, but it's generally not straight forward.

Reply
  • You probably only have Windows Authentication enabled. Unless you're running your NodeJS application as a Windows user, you're not going to be able to authenticate. And even then, I don't think there are "default" credentials like there is in C#. You'll either need to authenticate using basic auth, or build an integration to be able to authenticate as a Windows user. There's different ways to do it, but it's generally not straight forward.

Children