This error can occur from a few issues. Here are some to check:
1. Is REST Enabled in Community Server
2. Does the username that is configured in SharePoint belong to the role that can access the REST service. If not add them in Community Server
3. Does the user account that you're using in SharePoint exist in Community Server. Some actions, since you'll be authenticating via your logon name in SharePoint will not work unless your usernames match. (MayPreview assumes AD to AD account names without the domain)
Try those and let me know if it works. thanks!
Leon