Difference between revisions of "How To and Samples"

From SRP API Docs

(How To and Samples)
(How To and Samples)
Line 10: Line 10:
 
</pre>
 
</pre>
 
==== Other languages ====
 
==== Other languages ====
=== Othrr samples ===
+
=== Other samples ===
 
==== PHP ====
 
==== PHP ====

Revision as of 12:47, 1 February 2012

How To and Samples

Authentication

PHP

To create HMAC-SHA1 signature you can use:

$strPrivateApiKey = 'Jx1qfZA1OLgj5s6A8wzHI7T9aHb2b1zHItPATXPPJNwHBx17HZjKhnoLGJFX7t75';
$strStringToSign = 'GET https://api.structuredretailproducts.com/v1/products?market=MK0012 257 e4693df9ec5136eec8af95c1dd029a06 1328092781';
$strRawSignature = hash_hmac( 'sha1', $strStringToSign, $strPrivateApiKey, true);
$strSignature = base64_encode( $strRawSignature );

Other languages

Other samples

PHP