![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I figured it out - should work???
here's something like thishttps://cloud.yandex.ru/docs/speechkit/tts/request
right )
There is detailed documentation on the IBM website.
It is of great help to you. But unfortunately IBM does not have a Russian speaking voice.
There is detailed documentation on the IBM website.
It is of great help to you. But unfortunately IBM does not have a Russian speaking voice.
and in this documentation everything is crystal clear. Both curl and postman are easy to configure and get correct audio stream, but not WebRequest! ) That's the problem, discussed since the fifth page of this thread )))))
Authentication in Watson services
Last updated: 2019-12-12Control on GitHub: Open Documentation | Edit topic
You use IBM® Cloud Identity and Access Management (IAM) to send authenticated requests to IBM Watson™ public services. With IAM access policies, you can assign access to more than one resource from a single key. In addition, a user, service ID and service instance can contain multiple API keys.
IBM Cloud Pak add-ons use a different authentication mechanism for data. For more information, see the Documentation for your add-in.
credentials
To authenticate the service through its API, pass your credentials to the API. You can pass a bearer token in the authorisation header or in the API key.
Perform authentication using an IAM token.
IAM tokens are temporary credentials, valid for 60 minutes. When the token expires, you generate a new one. Tokens can be useful for temporary access to resources. For more information, see Generating an IBM Cloud IAM token using an API key.
Perform authentication using an IBM Cloud API key, a service ID API key, or a service-specific API key.
API keys are easy to use and have no expiry date. Anyone with a valid key can access the resource. You can create separate API keys for different users, different applications or to support key rotation scenarios. You can revoke API keys from the console without disturbing other API keys or the user.
For testing and development you can pass the API key directly. However, for production use, if you are not using the Watson SDK, use an IAM token. When you pass the API key, the service looks up the API key information, which can affect performance. For more information, see Calling the IBM Cloud service APIs.
The Watson SDKs support both methods. For more information, see. The Authentication section of the API reference guide for your service and SDK.
Premium plan users can also use IBM® Key Protect for IBM Cloud™ to manage data access. For more information, see the IBM® Key Protect. Protecting sensitive information in the Watson service.
About API keys
Watson services support three types of API keys:
IBM Cloud API keys are associated with user identity. Only the user associated with a key can remove it. The same IBM Cloud API key can be used to access different services. For more information about working with IBM Cloud API keys, see Manage User API Keys.
Service ID API keys
Service identifiers provide access to your IBM Cloud services through applications hosted both inside and outside IBM Cloud. API keys associated with service identifiers provide access associated with that service identifier. For more information about service ID keys, see Manage Service ID Keys. Service ID API key management section.
API Key Best Practices
Keep your API keys secure to reduce the chance of public disclosure of credentials that could compromise your account and applications. To keep your API keys secure, follow these guidelines.
Assign the most restrictive service role that is appropriate for the level of access you need.
For example, assign the Reader service role for calls from the application to GET API methods. This role has read-only access, so it cannot create or edit resources.
Do not insert the API key directly into the code.
API keys embedded in the code can be accessed by your users. Instead of embedding API keys in the code, store them either in environment variables or in files outside your source control system.
Do not store the API key in files inside your application's source code control system.
If you do store API keys in files, store the files outside the source code of your application. This practice is important if you use a public source code control system such as GitHub.
Restore or rotate the API keys.
Periodically create new keys or rotate them. And don't forget to delete keys you no longer use.
Quote:
Perform authentication using an IBM Cloud API key, a service ID API key, or a service-specific API key
says to select the right key for authentication. That is, this procedure cannot be ignored.
Question to TC - where did you get the key from?
Apparently, the problem is only with authorisation. This service is very strict about using its services. There are a lot of nuances in its policy and a free approach is unlikely to work. You could write to their support team and ask them how to log in properly.
Peter, thank you!
It's not about IBM. Everything works correctly with curl, postman. Authorisation is only done for one service, done with apikey and keyID.
The problem is in WebRequest and no additional links to TTS vendor sites will help here, unfortunately.
A working example of retrieving binary information from similar Microsoft TTS, Google TTS, Yandex TTS service using WebRequest is helpful.
The trick is to correctly write the syntax for WebRequest. The MQL5 Reference has only one example of WebRequest, and it is a stumbling block! )))
See how many examples there are on the IBM website for different scripting languages? Curl, Java, Python
MQL5 is not listed there and I have to guess the sludge of a drink remotely resembling cocoa
Here on this site - I uploaded a text file - and got a .wav file
how to organise it automatically is the question!?https://audio.online-convert.com/convert-to-wav
English only
Peter, thank you!
It's not about IBM. Everything works correctly with curl, postman. Authorisation is only done for one service, done with apikey and keyID.
The problem is in WebRequest and no additional links to TTS vendor sites will help here, unfortunately.
A working example of retrieving binary information from similar Microsoft TTS, Google TTS, Yandex TTS service using WebRequest is helpful.
The trick is to correctly write the syntax for WebRequest. The MQL5 Reference has only one example of WebRequest, and it is a stumbling block! )))
See how many examples there are on the IBM website for different scripting languages? Curl, Java, Python
MQL5 is not listed there and I have to guess a sludge of a drink that vaguely resembles cocoa.
The fact is that MQL5 is a language for development of proprietary applications to be sold. The general global policy towards the use of free content or services in paid software is different. I have a suspicion that for some reason webrequest doesn't load from IBM and keeps popping up 401 error.
Either the request syntax or API key is wrong.
Either the request from MT5 platform used for commercial product development is not supported. 3.
3. or WebRequest function works in a specific way and is internally restricted for such use.
4. Or, some other problem...
The point is that MQL5 is a language for developing proprietary applications to be sold. The general world policy towards the use of free content or services in paid software is different. I have a suspicion that for some reason webrequest doesn't load from IBM and keeps popping up 401 error.
Either the request syntax or API key is wrong.
Either the request from MT5 platform used for commercial product development is not supported. 3.
3. or WebRequest function works in a specific way and is internally restricted for such use.
4. Either, some other problem...
some other problem. As we say among experts, "there is something wrong" ))).
A bit above, I wrote in detail how WebRequest freezes but nevertheless receives a stream. The stream gets to the file and turns out to be broken. Perhaps I'm putting it into file incorrectly, but most likely the char array gets filled with extraneous information at the moment of deadlock.
This is what we should deal with now