Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted

message output "Exception: Failed to get access token 400 - {"error":"access_denied" }"

Hi, I'm yuta.

I want to use the quickstart API .

https://developers.refinitiv.com/refinitiv-data-platform/refinitiv-data-platform-apis/quick-start


Question.

If i execute rdpToken.py, outputs this messages.

yuta:/mnt/c/Users/yuta/Downloads/RDPPython_Samples_20200724/samples $ python rdpToken.py
Getting OAuth access token...
opts: []
args: []
Reading the token from: token.txt
Caught exception: [Errno 2] No such file or directory: 'token.txt'
Getting a new token using Password Grant...
Requesting from TOKEN_ENDPOINT: https://api.refinitiv.com/auth/oauth2/v1/token
Traceback (most recent call last):
File "rdpToken.py", line 114, in getToken
tf = open(TOKEN_FILE, "r+")
FileNotFoundError: [Errno 2] No such file or directory: 'token.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "rdpToken.py", line 160, in <module>
accessToken = getToken();
File "rdpToken.py", line 130, in getToken
tknObject = _requestNewToken(None);
File "rdpToken.py", line 56, in _requestNewToken
raise Exception("Failed to get access token {0} - {1}".format(response.status_code, response.text));
Exception: Failed to get access token 400 - {"error":"access_denied" }


settings

# User Variables
USERNAME = "gat.x131.calamity.orga@gmail.com"
PASSWORD = "this user's password"
CLIENT_ID = "xxxxxxxxxx12b2f981702b3710ca33cc4325"
UUID = "---YOUR PROVIDED USER ID---"


Client_ID specifies Generate ID.

is it right??


Please Help me.Thank you.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apiapi
1598807845589.png (36.3 KiB)
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.

@gat.x131.calamity.orga

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
18.2k 21 13 21

Hi @gat.x131.calamity.orga

Are you able to log in to api.refinitiv.com ?

Then please test this API call.

If you cannot access it, please contact your Refinitiv account manager for your company.


ahs1.png (124.9 KiB)
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.

Thank you for this answer.

If i logined this URL(api.refinitiv.com) , messages output "Authentication failed: error getting token",


Please help me. thank you!

1598874077508.png (30.2 KiB)

Hi @gat.x131.calamity.orga

I cannot locate your product.



Are you subscribing to any paid product such as Eikon or RDP?

If so, please contact your Refinitiv Account Mananger.

ahs.png (50.8 KiB)

Thank you for your check.

I understand need to subscribe.

I am Refinitv Account Manager.
What URL should i buy from??

Show more comments

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.