Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I am trying to fetch a NONCE Token so I can run HTTP requests in my command line to use the API. I am following:
but it still says that my authorization has failed when I do a curl command with a GET request. Windchill 12.1.2.0, and REST 2.5
Hi @VH_10947268
What authentication do you use? and how do you push the user and password in the request?
PetrH
I think I figured it out. I supply a -u to the curl, then my username and then it'll prompt me for my password and then it will then give me the NONCE token. What is the NONCE token for? It seems when I try to supply it, it tells me authentication failed anyways. Is there a way I can authenticate my terminal sessions so I don't have to supply the username and password everytime?
My understanding is that the NONCE token is used as an extra layer of security along with the normal form of authentication when using HTTP methods that change or delete data. It does not act as a replacement for your standard authentication method.
Assuming you are using Basic authorization, you can base64 encode the value <username:password> and use that in the header of your requests.