cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Fetching NONCE Token

VH_10947268
5-Regular Member

Fetching NONCE Token

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:

VH_10947268_0-1708536860361.png

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

3 REPLIES 3

Hi @VH_10947268 

What authentication do you use? and how do you push the user and password in the request?

PetrH

VH_10947268
5-Regular Member
(To:HelesicPetr)

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?

VanVelZ
6-Contributor
(To:VH_10947268)

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.

Top Tags