{
"request: {
"author_session": {
"author": {
"author_reference" => "user-id",
"allow_create_author_reference" => true,
"name' => "user-name",
"email" => "user-email",
"website_url" => "http://user-website",
"picture_url" => "http://user-picture",
"ip_address" => "user-ip-v4"
}
}
}
}
https://your-subdomain.api.oneall.com/loudvoice/authors/sessions.json
_oneall.push(['loudvoice', 'set_author_session_token', 'your-author_session_token']);
Please sign in to your OneAll account to ask a new question or to contribute to the discussions.
Please click on the link below to connect to the forum with your OneAll account.
Answers
The picture, url and IPV4 are required parameters? Can I omit them?
This, beside the full documentation, should maybe even automatically implemented in the OneAll system... I don't think it's so rare for developers to use this kind of solution...
What about the localization feature? Is there anything I can do for it? Should I open another thread for this?
response: { request: { date: "Fri, 06 Jan 2017 17:01:39 +0100", resource: "/loudvoice/authors/sessions.json", status: { flag: "error", code: 400, info: "please check the format of your request", } } }
The POST data is generated from this php code:
$data = [ 'request'=>[ 'author_session'=>[ 'author'=>[ 'author_reference'=>$uid, 'allow_create_author_reference' => true, 'name' => $name, 'email' => $email, 'website_url' => $web, 'picture_url' => $pic, 'ip_address' => $ip_addr ] ] ] ];
But then I had another issue. If I put the 'author_reference' key, the server won't accept it and throws an error saying that the reference is invalid. If I omit the parameter the server replies correctly.
we have now fixed an error where the LoudVoice API could wrongly return an error message for new references.
Could you please try again?
Do not omit the author_reference, otherwise the API will create a new author for each request.
Regards,
I am trying to achieve the same results (LoudVoice login through Social Login).
The problem I am facing is that a new instance of a Guest User is created with no reference to the social profile.
I think I am setting the author_reference in the wrong way. Which data from the Social Login Connection Api should be assigned the author_reference field?
I tried both the user_token and the identity_token but it doesn't seem the case.
Thanks in advance
Regards
to setup an author for an identity, the following JSON must be used:
{ "request: { "author_session": { "author": { "identity_token" => "user-identity_token", "allow_create_author_reference" => true, "ip_address" => "user-ip-v4" } } } }
Please replace the user-* fields by your own values.
The request must be send to:
https://your-subdomain.api.oneall.com/loudvoice/authors/sessions.json
Replace "your-subdomain" by your own subdomain