question

Upvotes
Accepted
5 5 3 5

Error generating Authentication token using curl command in linux server

Hi,

We are unable to generate authentication token using curl command in linux server.

curl -vks -X POST -H 'Content-Type: application/json' -H 'Prefer: respond-async' https://10.192.6.221/RestApi/v1/Authentication/RequestToken -d @CredentialsFile.txt

* About to connect() to 10.192.6.221 port 443 (#0) * Trying 10.192.6.221... Connection refused * couldn't connect to host * Closing connection #0

When we try to give the below curl commands, it doesn't give 200 response.

curl -kI https://10.192.6.222/RestApi/v1 curl: (7) couldn't connect to host

curl -kI https://10.192.6.221/RestApi/v1 curl: (7) couldn't connect to host

Please let know if there are any issues with TRTH website as we could not see any downtime in DSS as well.

Thanks,

Aishwarya

Hi,

We understand that there is a planned maintenance activity in TRTH. But the downtime is supposed to start at 5.30 AM IST and we are unable to hit the website from now (09:30 PM IST, the day before) itself. Please help us in understanding the root cause for this.

Regards,

Aishwarya

tick-history-rest-apiauthentication
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @Aishwarya.s1

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,
AHS

Hello again!

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

@Aishwarya.s1

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
-AHS

1 Answer

· Write an Answer
Upvote
Accepted
32.2k 40 11 20

Hello @Aishwarya.s1

Please check the access point, make sure the IP address provided to curl is correct, can you rather use full name?

I just tried:

curl -vks -X POST -k -H "Content-Type: 
application/json" -H "Prefer: respond-async"  
https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken -d @creds.txt

and got the token back

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.