Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRTH /
avatar image
REFINITIV
Question by Gang.Chen · May 09, 2020 at 03:48 AM · trthv2 rest api

TRTH REST API RequestToken issue

Hi Team,


Good day. Since customer in China mainland can't access hosted.datascopeapi.reuters.com, I suggest customer using IP 192.165.219.152 directly to request token. But customer got response "

SSLError(SSLCertVerificationError("hostname '192.165.219.152' doesn't match 'hosted.datascopeapi.reuters.com'")

"

Could you kindly pls advise what is the root cause and how to resolve it ? Many thanks

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.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by veerapath.rungruengrayubkul · May 11, 2020 at 03:40 AM

Hi @Gang.Chen,

SSL Certificates can be limited to a specific domain or sub domain. Requesting to IP address instead of domain name could cause the SSL certification validation failure in the application.

To avoid the issue, the client can disable certificate validation on the function or library used for the request. For example in Python, please see this question.

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 Gang.Chen · May 22, 2020 at 07:32 AM

Hi Veerapath,

Thanks for your reply about this. May I know how to disable certificate validation in C# demo example ? One of my customer facing this issue currently. Thanks again.

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 veerapath.rungruengrayubkul · May 22, 2020 at 08:24 AM

Hi @Gang.Chen,

For .Net application, below is the sample code to ignore the certificate name mismatch error.

using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

...

private Uri dssUri = new Uri("https://192.165.219.152/RestApi/v1/");

public bool ValidateServerCertificate(
    object sender,
    X509Certificate certificate,
    X509Chain chain,
    SslPolicyErrors sslPolicyErrors)
{
        if (sslPolicyErrors == SslPolicyErrors.None)
            return true;

        if (sslPolicyErrors == SslPolicyErrors.RemoteCertificateNameMismatch)
        // ignore name mismatch err
            return true;

        Console.WriteLine("Certificate error: {0}", sslPolicyErrors);
        // Do not allow this client to communicate with unauthenticated servers.
        return false;
}

public void ConnectToServer(string dssUserName, string dssUserPassword)
{
    System.Net.ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate; 
    extractionsContext = new ExtractionsContext(dssUri, dssUserName, dssUserPassword);
}
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
veerapath.rungruengrayubkul ♦♦ · May 22, 2020 at 09:00 AM 0
Share

For the DSS GUI example, you can add this code in the MainWindow.xaml.cs file.

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 >
9 People are following this question.

Related Questions

How to update a report template associated with a schedule in TRTHv2 using the REST API?

TRTHv2 API do not get any data for this RIC 1ADH5

About intraday prices: 'Tick' or something else?

I am receiving "Resource not found for the segment 'ExtractedFiles '."}}

TRTH REST API - Could you please provide python API code to retrieve extraction ID and also Python code to download extracted file.

  • 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