question

Upvotes
Accepted
15 1 2 3

Getting auth token - how to fill request

I keep trying to load API token from that URL https://api.refinitiv.com/auth/oauth2/v2/token using Postman application. I've tried to follow the documentation from Swagger and this is how I filled the required fields:
1640860013943.png
1640860038462.png
Unfortunately, the result is:

{
    "error": "invalid_client",
    "error_description": "client_id value doesn't match HTTP Basic username value"
}


I've tried also to provide username/password within body or tried to pass Authorization header with base64 username/password but with no effects. Then the error was:

{
    "error": "invalid_client",
    "error_description": "Invalid client or client credentials."
}


I need that token to be able within new application to authenticate user to be allowed to load data from Refinitiv API. But, perhaps there is a better solution for authenticate user within app, then I would be grateful for information. I build that application using React and ELF library.

@Edit: So far I got a token, but with that URL: https://api.refinitiv.com/auth/oauth2/v1/token ("v1" instead of "v2" within the URL above) and credentials like that:
1640877341878.png
Actually I got the token (first success;), but when I tried to get Business Summary from that URL: https://api.refinitiv.com/user-framework/mobile/overview-service/v1/corp/business-summary/IBM.N then that token didn't work (perhaps because of tle client_id I generated by myself?). I got as a result:

{
    "error": {
        "id": "33dc2c29-5385-46e6-9c30-3cb15fc52ac6",
        "code": "insufficient_scope",
        "message": "access denied. Scopes required to access the resource: [trapi.user-framework.workspace.crud]. Missing scopes: [trapi.user-framework.workspace.crud]",
        "status": "Forbidden"
    }
}
authenticationtoken
1640877341878.png (31.6 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.

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 20

Hello @marcin.cholewka,

Did you have a chance to test with Authentication-> Get Access Token request that is included in RDP Postman Starter Collection and Tutorial Samples example deck?

You appear to be missing a couple of required parameters in your Get Token request, this is why I am asking.

Client ID should be generated by yourself, check-marked as "EDP". Please see Quickstart guide for Refinitiv Data Platform for more information on getting started with RDP integration, including client ID requirement.

Additionally, your user id should be permissioned for the RDP service being requested from. The result of Get Acces Token should include the valid token and on it, please examine stanza "scopes" to see if the scope that is required "trapi.user-framework.workspace.crud" is also permissioned to your user id.

I hope this information helps.

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 your answer. Finally I got required permission and I am able now to load the Business Summary data. Anyway, I am still not able to make an authentication request using v2 API.


Yes, I made sample Postman authentication request on that RDP collection, but the URL was https://api.refinitiv.com/auth/oauth2/v1/token, not v2. Is maybe any differences between them?

Hello @marcin.cholewka ,

Please use v1 of Auth at present, I do not believe v2 is officially released yet, from what I know, it still undergoes testing.

Good, thank you for your opinion. I will use v1 then.

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.