Hash sign is sha256 hashed string of request parameters and values with your private key. Each parameter name is case sensitive.
Key1, Key2 below are parameter examples, some API calls require special parameters and others do not.
For example:
https://app.gatherup.com/api/doc/test <- Does not require any extra parameters, only use clientId to generate hash
https://app.gatherup.com/api/doc/user/create <- Does require 3 additional parameters, email, firstName and lastName
We offer a hash generator here. https://app.gatherup.com/api/doc/hash
First of all, you need to sort your parameters by key name. For example:
{ "clientId": "04f78076fbfc66940169d2199af7c6698019f9f3", "key1": "value1", "key2": "value2" }
Every example shows the parameters sorted in alphabetical order by parameter name.
Next step is to concatenate each parameter name and value. For example:
clientId | 04f78076fbfc66940169d2199af7c6698019f9f3 | key1 | value1 | key2 | value2 |
---|
Result should look like this:
clientId04f78076fbfc66940169d2199af7c6698019f9f3key1value1key2value2
Now we add privateKey on front:
privateKey | ea480aeb30a44e7ba85448619f9a6a94775b35d5886d4ce52dd452efb414406e |
---|
Result should look like this:
ea480aeb30a44e7ba85448619f9a6a94775b35d5886d4ce52dd452efb414406eclientId04f78076fbfc66940169d2199af7c6698019f9f3key1value1key2value2
Final step is to generate sha256 hash sign
a8433667201fecb79fc1751e122ce26b90d0a966dfe30d9ac376af565253d284
Now we can add it back to the request:
{ "clientId": "04f78076fbfc66940169d2199af7c6698019f9f3", "hash": "a8433667201fecb79fc1751e122ce26b90d0a966dfe30d9ac376af565253d284", "key1": "value1", "key2": "value2" }