• 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
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • All tags
    Load new posts
Log in to post
  • A

    Number of users via web hook or S2S call

    Scheduled Pinned Locked Moved APIs webhook s2s
    2
    0 Votes
    2 Posts
    131 Views
    Paul WinterhalderP

    Hmm, not really...

    You can get the number of sessions created in an hour with this call: https://getbraincloud.com/apidocs/apiref/#capi-globalapp-sysgetdailycounts

    But brainCloud doesn't otherwise track a concurrent session count per app.

    There are certainly 3rd party analytics packages that you could link into your client that would give you that sort of information though.

    Paul.

  • T

    Unreal 5.1 + Online Services

    Scheduled Pinned Locked Moved APIs unreal
    2
    0 Votes
    2 Posts
    128 Views
    T

    Looking a little more deeply; trying to use Brain Cloud with the Lyra example code

    https://github.com/getbraincloud/braincloud-unreal-plugin-src/blob/335e9c6fe0deb6674254b30ba5edb24f9a35817c/Source/OnlineSubsystemBrainCloud/Private/OnlineSubsystemBrainCloud.cpp#L28

    The session interface isn't written (nullptr) is returned. Can I presume from this that the OnlineSubsystem is in a pretty "early access" form?

  • K

    getMessagesPage with $or field not working probably

    Scheduled Pinned Locked Moved APIs messaging
    2
    0 Votes
    2 Posts
    142 Views
    J

    Hi Kirlos, as you can see from the response's message field, there are two elements (id and name) underneath, you need to append .id to specify the first search field for id, so change the "message.from" to "messsge.from.id" should solve this problem.

  • PaulW_PlayAP

    How do I code a custom webhook in brainCloud?

    Scheduled Pinned Locked Moved Solved APIs cloud code script webhook
    2
    0 Votes
    2 Posts
    224 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.

  • J

    Convert Anonymous to username/password

    Scheduled Pinned Locked Moved APIs authentication unity
    2
    0 Votes
    2 Posts
    126 Views
    J

    Call AttachUniversalIdentity() method from client lib, the username is uniqueness enforced.

  • PaulW_PlayAP

    What version of Javascript does cloud code support?

    Scheduled Pinned Locked Moved Solved Cloud Code javascript cloud code script
    2
    0 Votes
    2 Posts
    176 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.

  • G

    bridge.include doesn't exists

    Scheduled Pinned Locked Moved Cloud Code bug
    2
    0 Votes
    2 Posts
    128 Views
    J

    Hey, there must be some syntax error in your script, would you be able to provide your script code here?

  • dhptD

    Steam StartPurchase: No docs, no success

    Scheduled Pinned Locked Moved APIs marketplace microtx products start purchase startpurchase steam
    2
    0 Votes
    2 Posts
    137 Views
    J

    Hi Dylan, actually, the argument purchaseData for StartPurchase() method takes the Steam Item ID (from Edit Price Entry pop-up) as the input field (not the Item ID from the product list)
    7e9ff7b1-1854-4a48-8e38-d219501da3fd-image.png

  • H

    How to add to an array in Cloud Code?

    Scheduled Pinned Locked Moved Cloud Code function cloud code push array cloud code script
    2
    0 Votes
    2 Posts
    142 Views
    H

    I posted this almost 13 days ago with zero answers, so I took some time to look through a bunch of documentation and did a ton of trial and error. Please Braincloud for the love of god add this to your API.

    Rhino does not handle Arrays the way that other coding languages do.

    I figured it out, unlike most arrays that return an array after you call push- Rhino returns the new length. So if you call push, don't set it's value.

    var copyArray = []; //I assume this line tells it to be an array for (var i = 0; i < postResult.data..length; i++) { copyArray[i] = postResult.data[i]; //arrays do not behave like .Net arrays, you can change length without initializing, so you just set each index to the index of the array you're copying } copyArray.push(variableToAdd); //Do NOT set this as the value of your array, the push method returns an int (length of array) NOT an array! //you probably dont need to call push at all to add to the array as shown in the for loop above if you already know your length or want a specific length

    Then just set your value to the variable, like this

    var entityData = { "variableName": copyArray }; //No need to call Array(copyArray) or any of the prototype. slice stuff. If you call Array() you'll just nest the array a second time.

    Use this page for further info on functions you can do with arrays.

  • R

    Simple S2S call via nodejs server

    Scheduled Pinned Locked Moved APIs node.js
    2
    0 Votes
    2 Posts
    127 Views
    R

    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 = "sharedprod.braincloudservers.com"; ... brainclouds2s.request(global.s2sContext, { service: "group", operation: "SYS_CREATE_GROUP", data: groupData, }); })
  • C

    NPM braincloud package install

    Scheduled Pinned Locked Moved General node.js npm
    2
    0 Votes
    2 Posts
    39 Views
    J

    You can bypass the peer dependencies by adding --legacy-peer-deps flag to your npm install. After modifying package.json, then use npm-install-peers to install the rest of peer dependencies.

  • Paul WinterhalderP

    brainCloud 4.9 is coming! Details and discussion!

    Scheduled Pinned Locked Moved General 4.9 braincloud release
    2
    1 Votes
    2 Posts
    43 Views
    Paul WinterhalderP

    And brainCloud 4.9 is live!

    Let us know if you have questions or issues!

    Paul.

  • J

    How to view users online ?

    Scheduled Pinned Locked Moved APIs friends group
    2
    0 Votes
    2 Posts
    135 Views
    Paul WinterhalderP

    Hi Jose,

    Sounds like you want to look into our Presence feature.

    Presence is designed to let users know when their friends are online. You can think of it like the old Xbox Live friends feature - where you can see which of your friends are online - and optionally what they are doing.

    And Presence uses RTT - so users will be notified in realtime when the presence information of a followed user changes.

    Presence works with Friends, Groups, and arbitrary lists of users.

    More details here - http://getbraincloud.com/apidocs/apiref/#capi-presence

    Hope that helps!

    Paul.

  • PaulW_PlayAP

    How do I look-up a player?

    Scheduled Pinned Locked Moved Solved APIs api
    2
    0 Votes
    2 Posts
    209 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.

  • U

    Setting up segment integration

    Scheduled Pinned Locked Moved General segment integrations
    2
    0 Votes
    2 Posts
    45 Views
    U

    I figured it out. Segment has a Legacy - Project source type, using that worked.

  • D

    Convert to JSON: does brain cloud provide object types for response returns?

    Scheduled Pinned Locked Moved General sdk
    2
    0 Votes
    2 Posts
    58 Views
    D

    Solved:

    IDK if this is the right approach but I am using brainCloud's LitJson and JSONMapper. I will map out the things I need and put it into an object of variables I chose to parse out.

  • D

    Tournament Questions

    Scheduled Pinned Locked Moved General tournament portal cloud code api hook
    2
    0 Votes
    2 Posts
    47 Views
    J

    (Post the answer from brainCloud chat channel)

    Actually, there is a workaround that you can perform the tournament rewards adjustments,

    Turn off the auto claim Add a post-hook to Authenticate instead <- where auto-claim would normally run And in the post-hook look to see if they have tournament rewards, and if they do, claim them there - performing any award adjustments that need to be made.
  • R

    Anyone available for Freelance?

    Scheduled Pinned Locked Moved General freelance job batch replace script
    2
    0 Votes
    2 Posts
    30 Views
    J

    (Note: this issue has been solved through our online chat support.)

  • Paul WinterhalderP

    New Relay Servers coming in brainCloud 4.5.6...

    Scheduled Pinned Locked Moved General braincloud 4.5.6 release
    2
    1 Votes
    2 Posts
    38 Views
    Paul WinterhalderP

    As a further heads up folks - it is looking like the 4.5.6 server release may get delayed until early next week. This is to allow us to create a proper mechanism for controlling with specific versions of Lobby Services are active at a time... (right now, it is possible for both old and new lobby services to be active during an upgrade transition - and given how much lobby processing has changed in this release - that wouldn't be good).

    That said - the rest of 4.5.6 is ready - so we are going to be doing a bit of an incremental roll-out...

    We are starting to release the 4.5.6 Client Libraries today We are also making the 4.5.6 Relay Servers available (on our existing 4.5.5 servers) <- this is a simple feature gate for us to enable.

    Then, once the 4.5.6 servers (with the new Lobby Servers and a few other fixes) are available, we will release them... that should be either late this week, or more likely early next week).

    Anyway, just FYI...

    Paul.

  • T

    Saving global stats that are accessible with listFriends request.

    Scheduled Pinned Locked Moved APIs publicdata summaryfrienddata unity cheatprevent
    2
    0 Votes
    2 Posts
    125 Views
    J

    To limit operations like IncrementExperiencePoints() to cloud code only. This will essentially take away the ability to make these calls from the bare client API. You can see a script that enforces these restrictions here - https://getbraincloud.com/apidocs/cloud-code-central/handy-cloud-code-scripts/restrictclientcalls-script/

    Refer to another post below for more strategies you can apply to prevent cheating: https://forums.getbraincloud.com/topic/23/discussion-strategies-to-prevent-cheating-in-tournaments

  • Login

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