question

Upvotes
Accepted
3 1 0 1

Get access token via browser - Access-Control-Allow-Origin

I can not get a token using a web browser (e.g. Chrome), neither a refresh token nor an access token. The token endpoint (https://api.refinitiv.com/auth/oauth2/beta1/token) does not include an Access-Control-Allow-Origin response header in the response. For security reasons modern web browsers prevent connections to servers without this header.

Using postman or python we can generate access and refresh tokens.

As soon as a token pair has been generated the access token can be used to get data from an endpoint (e.g.https://api.refinitiv.com/data/environmental-social-governance/v1/views/measures-full?universe=BNPP.PA) using a web browser because the esg data endpoints includes this headers.

Is there a particular reason for preventing token generation directly from a browser?

rdp-apirefinitiv-data-platformhistoricaltoken
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 @daniel.schlingmann

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

1 Answer

· Write an Answer
Upvotes
Accepted
22k 59 14 21

Hi @daniel.schlingmann Currently EDP supports Password and Refresh grants only. We will be adding Implicit and Authorization Code grant types soon, which will enable browser based applications to request a code or a token and use EDP services.

You can use a reverse proxy to continue developing your application meanwhile.

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.