Simple S2S call via nodejs server

  • I'm trying to follow the basic structure of an S2S call via node as demonstrated here but I get back rafts of Java stack with this at the top:

    "status_message":"Processing exception: com.braincloud.common.ProcessingException: Invalid app ID.\

    and as far as I can tell I have set these values appropriately. I even tried using a numeric type for the ID. Any idea what I'm doing incorrectly?


    const brainclouds2s = require("brainclouds2s");
    const appId = "1***1";
    const serverSecret = "e2******27";
    const url = "";
    const serverName = "*****"
    const groupData = {
        name: 'TestGroup',
        groupType: 'StudentGroup',
        isOpenGroup: false,
        acl: {
            member: 1,
            other: 0
        jsonOwnerAttributes: {},
        jsonDefaultMemberAttributes: {},
        jsonData: {}
    global.s2sContext = brainclouds2s.init(appId, serverName, serverSecret, url);
    brainclouds2s.setLogEnabled(global.s2sContext, true);
        data: groupData})

  • This seems to be working now, the error is a wee misleading. The code was correct. The URL was incorrect and was changed to (or leave blank):

    const url = "";
    brainclouds2s.request(global.s2sContext, {
        service: "group",
        operation: "SYS_CREATE_GROUP",
        data: groupData,

Log in to reply