Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
avatar image
Question by graeme.taylor · Sep 17, 2019 at 02:23 PM · pythonedp

Unable to run sample API from Windows

I am trying to run the sample code 'market_price_edpgw_service_discovery.py'. I have set the following variables:

user = 'MY_MACHINE_ID'

password = 'MY_PASSWORD'

I have also tried setting

client_secret = 'MY_PASSWORD'


However, I am receiving the below response:

Sending authentication request with password to  https://api.edp.thomsonreuters.com:443/auth/oauth2/beta1/token ...
EDP-GW authentication result failure: 400 Bad Request
Text: {"error":"access_denied"  ,"error_description":"Invalid username or password." } 

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

6 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Gurpreet · Sep 18, 2019 at 12:33 PM

Here is the EDP endpoints which are used for streaming data:

api.refinitiv.com

*.pricing.streaming.edp.thomsonreuters.com

It might help to setup a debugging proxy server like Fiddler to capture your raw HTTP request/response and compare. See the instructions here.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
wasin.waeosri ♦♦ · Oct 09, 2019 at 07:40 AM 0
Share

@Ziemowit Kupracz, @graeme.taylor

Did the problem still occur in your environment? Did you have a chance to setup a debugging proxy server to test your request as suggested by Gurpreet?


avatar image
REFINITIV
Answer by Gurpreet · Sep 17, 2019 at 02:29 PM

Hi @graeme.taylor, Your machine ID is usually alpha-numeric containing - and starts with GE. If that is what you are using, then please raise this issue with your account manager to get your credentials verified.

The client_secret variable is not used, and has to be blank.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by graeme.taylor · Sep 17, 2019 at 02:32 PM

Hi @Gurpreet,


Yes, I am using my correct machine ID and password. I replaced them in snippet above due to public forum. Credentials have already been verified.

The response is identical with or without client_secret being set.


Thanks,`


Graeme

Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Gurpreet ♦♦ · Sep 17, 2019 at 02:49 PM 0
Share

It is obviously an issue with credentials, since the python sample works fine and is used by many of our clients. Unfortunately, I don't have any means of checking your permissions. I would recommend that you contact the account manager again.

avatar image
graeme.taylor · Sep 17, 2019 at 03:39 PM 0
Share

The credentials have been tested by Ziemowit from Refinitiv and are ok. The main difference is I am running behind a proxy so have amended the request to pass in Proxy information.

avatar image
REFINITIV
Answer by Ziemowit.Kupracz · Sep 17, 2019 at 03:35 PM

@Gurpreet.

Hello,

The credentials themselves are fine - they have been tested with direct connection and worked. The cause is likely because the connection needs to go through proxy and that is when the example stops working.

Is there a documentation or example which shows how to handle proxy in Python?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Gurpreet · Sep 17, 2019 at 06:18 PM

@Ziemowit Kupracz, @graeme.taylor The error message that you have posted is coming from the EDP servers -- it demonstrates that the python sample is able to reach and successfully interact with EDP.

Here is the raw HTTP response I receive when using an invalid password:

HTTP/1.1 400 Bad Request
Date: Tue, 17 Sep 2019 18:14:14 GMT
Content-Type: application/json
Content-Length: 81
Connection: keep-alive
X-Amzn-Trace-Id: Root=1-5d812276-*****308bfcc879a
X-Served-By: region=us-east-1; cid=ddff84a6-****-76f03c517b90
X-Tr-Requestid: 5ed3******1602bb1

{"error":"access_denied"  ,"error_description":"Invalid username or password." } 


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by graeme.taylor · Sep 18, 2019 at 08:32 AM

It's possible that our proxy is stripping out the credentials. Can you give me a complete list of endpoints so I can ensure they are whitelisted from my end please?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
11 People are following this question.

Related Questions

Get CFS File with ESG Data

Is docID to retrieve research reports via EDP API a unique and non-overlapped ID?

Retrieving security metadata

I can not get credential in Research API

Relating historic fields to build OHLC candles

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges