parse-community / parse-php-sdk

The PHP SDK for Parse Platform
https://parseplatform.org/
Other
811 stars 346 forks source link

ParseObject -> Save() get "unauthorized" #458

Closed fayqiao closed 4 years ago

fayqiao commented 4 years ago

#Parse Server app_id, master_key and URL all has been setup as below:

---------- ParseClient::initialize($this->app->config("parse.app_id"), null, $this->app->config("parse.master_key"));

ParseClient::setServerURL($this->app->config("parse.host"), 'parse');

$this->health = ParseClient::getServerHealth();` ----------

Checked server health and get 200.

However, when I try to Save Object to the server, get error -> unauthorized

---------- $customObject = new \Parse\ParseObject($class);

//pass value into $customObject

$customObject->save(); ----------

Get error -> unauthorized

avagru commented 4 years ago

$customObject->save(true); Could you try this? if fails, please let me know about $class.

fayqiao commented 4 years ago

;) Thanks Vueking, I added the "use masterkey ture" to make it works already, but thanks anyway.