• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
Ima Need-SupportI

Ima Need-Support

@Ima Need-Support
About
Posts
7
Topics
5
Groups
0
Followers
0
Following
0

Topics

  • Ima Need-SupportI

    I didn't receive my registration email...

    Scheduled Pinned Locked Moved Solved Portal Defects portal registration
    2
    0 Votes
    2 Posts
    276 Views
    Paul WinterhalderP

    Sadly, some spam filters don't like our registration emails.

    So be sure to check your spam filter - and whitelist @getbraincloud.com.

    If that doesn't help, contact support via the Green Chat widget, and we'll help you out!

    Paul.

  • Ima Need-SupportI

    How do I code a custom webhook in brainCloud?

    Scheduled Pinned Locked Moved Solved APIs cloud code script webhook
    2
    0 Votes
    2 Posts
    428 Views
    Paul WinterhalderP

    Hi,

    Here are the steps to setting up a webhook to call a custom cloud code script in brainCloud:

    Step 1 - Write your script

    Go to Design | Cloud Code | Scripts and create your script You might want to just start with a simple script that logs the incoming parameters (see sample below) Be sure to enable the S2S callable field on the Details page.

    Step 2 - Declare the webhook and link it to your script

    Go to Design | Cloud Code | WebHooks and create your webhook Link it to the script that you just wrote. If you don't see your script in the list, double-check the state of the S2S callable field You can optionally restrict the webhook to be callable via a range of ip ranges (good for additional security) Click [Save] and copy the webhook URL that gets generated

    Step 3 - Go to the external service, and give it your webhook URL

    This step varies by service of course.

    Step 4 - Trigger the webhook to test

    This also varies by service. You could use Postman to do it as well.

    Step 5 - Confirm the structure of the incoming parameters

    It is a bit difficult to figure out what a webhook will send you ahead-of-time The simplest is to invoke the hook, and then examine the results See the sample logging script below for an example Then view the logged input data via Monitoring | Global Monitoring | Recent Errors. Be sure to enable Info -level messages, and click [Refresh]

    Step 6 - Complete the writing of your script

    Now that you know how the parameters are being sent, you should be good to complete your script. More info on webhook development here - https://getbraincloud.com/apidocs/apiref/?cloudcode#cc-ccscripts-webhooks Good luck!

    Sample script - just dumps parameters:

    var response = {}; bridge.logInfoJson("Script invoked from webhook. Contents of data...", data); // Return the webhook response response.statusOverride = 200; response.jsonResponse = {}; response;

    Note - you can also view the request sent and response received from your webhook via the Server Logs. For more information on brainCloud logs - see this knowledge base article.

    Hope that helps!

    Paul.

  • Ima Need-SupportI

    What version of Javascript does cloud code support?

    Scheduled Pinned Locked Moved Solved Cloud Code cloud code script javascript
    2
    0 Votes
    2 Posts
    388 Views
    Paul WinterhalderP

    brainCloud's Cloud Code is based on Apache Rhino, which is an open-source implementation of JavaScript. This engine is highly sandboxed within the brainCloud API servers for security purposes.

    brainCloud currently ships with Apache Rhino version 1.7.7.1.

    Rhino implements JavaScript 1.7, and is basically ES4 with partial ES5 and ES6 support.

    Summary from a Stack Overflow discussion here:

    2019-05-27_11-54-35.png

    Hope that helps!

    Paul.

  • Ima Need-SupportI

    How do I look-up a player?

    Scheduled Pinned Locked Moved Solved APIs api
    2
    0 Votes
    2 Posts
    395 Views
    Paul WinterhalderP

    Hi,

    brainCloud offers a number of APIs for looking up other players. You'll find them all in the Friend service.

    As far as looking up players by name, it isn't highly recommended - since names in brainCloud are not guaranteed to be unique (and thus lookups are less deterministic and slower).

    It's generally more useful to look up other players by UniversalId - which are guaranteed to be unique.

    Now - maybe your app isn't using Universal Identities - so it seems odd to lookup by the UniversalId. Luckily, brainCloud supports a non-login version of a UniversalId - so you can have the user pick a Display Name which will be associated with their account, but they don't actually log in via it (and there's no password for it stored).

    To use non-login UniversalIds...

    Attach the non-login identity via AttachNonLoginUniversalId() Later on, to update the id, use UpdateUniversalIdLogin() <-- disregard the misleading name - it works for both login and non-login versions of UniversalId Set the player's name to match the universalId (useful for leaderboards) via UpdateUserName() Finally, to look-up a player, use FindUserByExactUniversalId() or FindUserByUniversalIdStartingWith()

    Hope that helps!

    Paul.

  • Ima Need-SupportI

    How can I manage multiple versions of my app between development, staging, production, etc?

    Scheduled Pinned Locked Moved Solved General versioning app management
    4
    0 Votes
    4 Posts
    494 Views
    Steve JonesS

    If your app uses Global Entities, don't forget to Export/Import the required entities from the Dev->Staging->Live apps. You can export all, or some via the Bulk Actions Menu within the Monitoring/Global Monitoring/ Global Entities page.

    More about Global Entity File Export Formats are here, https://getbraincloud.com/apidocs/api-modules/global-entity-file-formats/

    Hope this helps!

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users