question

Upvotes
Accepted
21 10 17 38

Invalid encrypted protocol type(2) for requesting RDP service discovery

Got “Invalid encrypted protocol type(2) for requesting RDP service discovery, ErrorCode=-22” when running EMA application consumer example cons113. What's the root cause? Is that due to TLS version?

#technologyema-api
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.

Upvotes
Accepted
27.7k 67 18 14

Hello @Frederic

My colleague, @Jirapongse can replicate the issue by setting the wrong value to the EmaConfig.xml's EncryptedProtocolType property.

image.png

Could you share and recheck your EmaConfig.xml file? The supported value of the EncryptedProtocolType for the encrypted RSSL connection (RTO) is as follows:

1727249588019.png



image.png (30.3 KiB)
1727249588019.png (166.4 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.

Upvotes
27.7k 67 18 14

Hello @Frederic

I never experience this kind of error message. Could you please give me more detail as follows?

  • RTSDK version and edition
  • OS and compiler detail
  • Can you replicate the issue on demand?
  • Replication steps

Can you try the following cURL commands in the same machine that encounters the issue?

Step 1: Authentication

If you are using the Version 1 Authentication (Machine-ID type)

curl  -X POST \
  'https://api.refinitiv.com:443/auth/oauth2/v1/token' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'username=<Machine-ID>' \
  --data-urlencode 'password=<Password>' \
  --data-urlencode 'client_id=<App Key>' \
  --data-urlencode 'grant_type=password' \
  --data-urlencode 'takeExclusiveSignOnControl=true' \
  --data-urlencode 'scope=trapi'

If you are using the Version 2 Authentication (Service Account/CIAM type)

curl  -X POST \
  'https://api.refinitiv.com:443/auth/oauth2/v2/token' \
  --header 'Accept: */*' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'client_secret={client secret}' \
  --data-urlencode 'client_id={client id}' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'scope=trapi'

Then copy the return access token.

Step 2: Test Service Discovery

curl  -X GET \
  'https://api.refinitiv.com:443/streaming/pricing/v1/' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <Access Token from Step 1>'
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.

Checking and will back later, thank you.

Looks like it's OK for the response of those commands (respond with the list of those AWS endpoints). Is that possible due to some issue with the C++ running environment? Not sure the meaning of “Invalid encrypted protocol type(2) for requesting RDP service discovery, ErrorCode=-22”

Upvotes
27.7k 67 18 14

Hello @Frederic

The RTSDK C/C++ uses the OpenSSL, zlib, and cURL libraries to connect to the encrypted server RTO. You may check if you have set up those libraries on your machine correctly from the following articles

Additionally, did the same HTTP error returns for an authentication request (the first request from the API to the platform)?

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.