Preparing an API request
Last updated on
30 April 2025
Requirements for a valid API request
For making an API request to the SocialHub Publisher API you must provide the following data as query in the URL:
It is also required to send a application/json request content when making a HTTP POST or PUT request.
Generating a signature
A request signature is a SHA1-hash consisting of
- HTTP method
- Request URI (without query string)
- Raw request content
- App Secret Key as hashing-key
Example PHP code:
// The HTTP method.
$body = $request->getMethod() . '&';
// Request URI (without query string)
$body .= substr($request->getUri(), 0, strpos($request->getUri(), '?'));
// Raw, serialized request content
$body .= $request->getContent();
// Generating the signature SHA1-hash with the App Secret key as hashing-key.
$signature = hash_hmac('sha1', $body, $app_secret_key, FALSE);
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
SocialHub Publisher API