G
G
GronZo2014-10-24 09:51:25
API
GronZo, 2014-10-24 09:51:25

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.

I, on the other hand, do this:
$mySign = md5($params.md5($apiPassword.'api-pass'));

Server response: The signature is invalid.
Tell me where I am a fool myself, or some errors in the description of the generation.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question