Questions tagged [parse-cloud-code]

This code runs in the Parse Cloud rather than running on a mobile device. For complex apps, sometimes developers just need a bit of logic that isn't running on a mobile device. Cloud Code makes this possible.

The Parse Platform's vision is to let developers build any mobile app without dealing with servers. For complex apps, sometimes developers just need a bit of logic that isn't running on a mobile device. Cloud Code makes this possible.

Cloud Code is easy to use because it's built on the same JavaScript SDK that powers thousands of apps. The only difference is that this code runs in on a Parse Server rather than running on a mobile device. When developers update their Cloud Code, it becomes available to all mobile environments instantly. They don't have to wait for a new release of their application. This lets developers change app behavior on the fly and add new features faster.

1120 questions
2
votes
1 answer

Swift wrongly reading Cloud Code error

I am trying to handle an error from a PFCloud function in Swift with if error != nil. Although neither the Cloud Code or Stripe return an error, Swift responds as if there was one. Swift PFCloud.callFunctionInBackground("authorize", withParameters:…
Dups
  • 201
  • 1
  • 2
  • 12
2
votes
1 answer

Parse - Run cloud function after a specific amount of time is passed

In a table of my mongoDB, there is a column of type Date, say untilDate, which is always equal to its creation date + 24h... Is there any way, to trigger a cloud function to run, when the current date equals untilDate? PS: Note that many objects of…
Sotiris Kaniras
  • 520
  • 1
  • 12
  • 30
2
votes
1 answer

Invalid Function Error when running Cloud Function of Parse Server on back4app

The error code is below: {"code":141,"message":"Invalid function: \"test\""} main.js Parse.Cloud.define('test', function(request, response){ response.success('OK'); }, function(error){ response.error(error); …
nonkertompf
  • 387
  • 1
  • 3
  • 12
2
votes
1 answer

Parse Index.js and Cloud code

This may be a stupid question... But I don't know where to find the index.js file and the main.js file of the cloud code in my parse android project.
Mario Mouris
  • 317
  • 1
  • 12
2
votes
2 answers

How to get object id of ParseUser in javascript?

Out of the following methods, only the last one gives me the object id of the user where I convert the ParseUser to a JSON object then access that. Is there a nicer way to get the objectId? console.log("GET objectId:" +…
2
votes
1 answer

OneSignal Push for array of vales

Using Parse Cloud to send push notifications with OneSignal. Parse.Cloud.define('push', function(request, response) { var user = request.params.userId; var message = request.params.message; var type = request.params.type; var jsonBody = { …
Peter
  • 1,053
  • 13
  • 29
2
votes
0 answers

hosted parse Cloud code find(...) does not retrieve sessionToken

I am migrating Parse.com cloud code to hosted parse-server. Mongodb is already migrated. The code is supposed to retrieve a user's sessionToken according to its google plus id. The find operation succeeds and a user is returned but the user does not…
drorsun
  • 881
  • 1
  • 8
  • 22
2
votes
0 answers

Parse Server Cloud Code afterSave's not working on Elastic Beanstalk

I've created Cloud Code afterSave and beforeSave functions for my Parse Server which runs perfectly when I'm running my server locally. However, when I deploy to Elastic Beanstalk, the afterSave functions simply does not work. beforeSave's do…
2
votes
1 answer

request.user not set in Cloud Code function

I'm calling a Cloud Code function from a JavaScript application with a logged-in user, like this: if (Parse.User.current()) { // just to assert there is a logged-in user Parse.Cloud.run('foo').then(...); } In the Cloud Code function I want to…
dr_barto
  • 5,723
  • 3
  • 26
  • 47
2
votes
1 answer

Parse Server Cloud Code Query Syntax Error 141

I cannot for the life of me get a Parse-server Query to work using cloud code... I simply want to retrieve an object from my mLabs database. I am running prase server on Heroku with the database on mLabs. Currently any attempt to query results in…
Jerland2
  • 1,096
  • 11
  • 28
2
votes
2 answers

How to configure Twilio on parse server?

I am attempting to incorporate Twilio into my application that is running on my parse server deployed with Heroku and MongoLab. I am trying to configure by using this code in my cloud/main.js file var twilio =…
2
votes
0 answers

Why am I getting an error when using the stripe API?

I get an error which I have never seen when trying to retrieve the customers stripe information. The error type: "invalid_request_error" message: "This action requires additional privileges" Cloud Code var Stripe =…
user6032625
  • 197
  • 1
  • 2
  • 14
2
votes
1 answer

Any idea why Parse.Object.destroyAll() is only destroying 20 objects at a time?

I know I've used Parse.Object.destroyAll() before with much success. It does what it's supposed to and destroys all the objects you pass in. However, I'm currently running the following code: Parse.Cloud.job("deleteStuff", function( request, status…
Jake T.
  • 4,308
  • 2
  • 20
  • 48
2
votes
1 answer

Calling Parse Cloud Code function from Express Get Method

I just have a super quick question for those knowledgeable in Parse, Cloud Code, Twilio and Express... Basically I've set up a node.js Express function that handles the GET for a particular URL that gets called by Twilio whenever someone calls a…
Evan K. Stone
  • 1,169
  • 11
  • 15
2
votes
2 answers

Firebase AfterSave function like Parse.com

So I was using Parse.com AfterSave cloud code function to keep a list of the most recent Posts relating to a specific location. The reason for this is to get the most recent post for a location without having to search and order the entire list of…
rex
  • 3,133
  • 6
  • 35
  • 62