public function sendInvite($socialInviteRequest, $socialInviteAppSecret) {
        $restUrl = $this->getRestUrl('/1/social-invite/invitation');

        $sender = $this->getOrCreateSenderId($socialInviteRequest->senderAddress);

        if(is_string($socialInviteRequest->recipients)) {
            $temp = explode(',', $socialInviteRequest->recipients);
            unset($socialInviteRequest->recipients);
            for ($i = 0; $i < count($temp); $i++) {
                $socialInviteRequest->recipients->destinations[$i] = new stdClass();
                $socialInviteRequest->recipients->destinations[$i]->address = $temp[$i];
            }
        }

        $params = array(
            'messageKey' => $socialInviteRequest->messageKey,
            'sender' => $sender,
            'recipients' => $socialInviteRequest->recipients
        );

        list($isSuccess, $content) = $this->executePOST(
            $restUrl, $params, 'application/json', $socialInviteAppSecret
        );

        return $this->createFromJSON('infobip\models\SocialInviteResponse', $content, !$isSuccess);
    }