Answer the question
In order to leave comments, you need to log in
How to create a signature when working with Etxt API?
Good afternoon!
I'm trying to implement work with the etxt.ru site API ( link )
At the same time, I ran into the problem of generating a signature for requests, I implemented everything else without problems.
Text description of the signature generation process:
Request
signing To make sure that the request is actually sent by you, and not by attackers on behalf of your application, all requests to the API must be signed. You must pass the result of the signature calculation in the sign parameter. The exchange will verify the signature and only execute the request if the signature is correct.
The algorithm uses a separate api_pass key, which we strongly recommend that you store only on your servers and use only when making requests from them to the Exchange server. This key is set in the "My profile/Interface settings" section.
sign = md5(params.md5(api_pass.'api-pass'))
The params value is a concatenation of name=value pairs sorted alphabetically by name, where name is the name of the parameter passed to the API function, and value is the value of the parameter. The separator is not used in the concatenation. The sign parameter is not taken into account when calculating the signature, all other request parameters must be taken into account when calculating.
The security of the scheme is based on the fact that only you and the Exchange know api_pass. Therefore, never disclose it to third parties. If you have any doubts about the security of api_pass, change it in your profile settings.
$mySign = md5($params.md5($apiPassword.'api-pass'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question