Because of obsolescence of Enterprise Integration Lab, we are evaluating switching to Elektron in Cloud with ETA. As part of login process authentication token has to be obtained first.
However, none of the session management samples are working.
Some are trying to request token by using /getToken url, which seems to be outdated.
Others are requesting token from https://api.edp.thomsonreuters.com/auth/oauth2/beta1/token. And fail too.
To make a clean test, we try to get authetication token using following curl command:
curl --data-urlencode "username=<user>&password=<password>&grant_type=password&scope=trapi"
-X POST -H "Accept: application/json" -H "Content-Type:
application/x-www-form-urlencoded" -v
https://api.edp.thomsonreuters.com/auth/oauth2/beta1/token
This command returns "Missing required parameter 'grant_type'" error. See below.
* About to connect() to api.edp.thomsonreuters.com port 443 (#0) * Trying 52.22.204.128... connected * Connected to api.edp.thomsonreuters.com (52.22.204.128) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA * Server certificate: * subject: CN=api.refinitiv.com,OU=EDS Request Response,O=Thomson Reuters Inc,STREET=3 Times Square,L=New York,ST=NY,postalCode=10036,C=US * start date: Jul 08 00:00:00 2019 GMT * expire date: Jul 07 23:59:59 2021 GMT * common name: api.refinitiv.com * issuer: CN=COMODO RSA Organization Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB > POST /auth/oauth2/beta1/token HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: api.edp.thomsonreuters.com > Accept: application/json > Content-Type: application/x-www-form-urlencoded > Authorization: Basic R0UtQS0wMDIwNDEyMi0zLTIwMDA= > Content-Length: 117 > < HTTP/1.1 400 Bad Request < Date: Mon, 22 Jul 2019 06:25:48 GMT < Content-Type: application/json < Content-Length: 204 < Connection: keep-alive < Access-Control-Allow-Origin: * < Server: edsgw < X-Amzn-Trace-Id: Root=1-5d3556ec-e48f35e88663fa88756f2588 < X-Tr-Requestid: 708cf542-a25c-41c8-a5c5-deb3cd0dff7b < {"error":{"id":"708cf542-a25c-41c8-a5c5-deb3cd0dff7b","code":"400","message":"Validation error","status":"Bad Request","errors":[{"key":"grant_type","reason":"Missing required parameter 'grant_type'"}]}} * Connection #0 to host api.edp.thomsonreuters.com left intact * Closing connection #0
If we omit 'username' parameter in curl command, the error changes to "Missing required parameter 'username'", so it's clearly POSTing all data parameters including 'grant_type'.
Can anyone explain why this returns error and/or perhaps point in direction to some samples that are actually working.
Thank you.
Serge