Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: php hint for using master key for requests #881

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions _includes/php/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ If your server does not use or require a REST key you may initialize the ParseCl
ParseClient::initialize( $app_id, null, $master_key );
```

### Using Master Key

Even though you specify the master key for intialization the master key is **NOT** used by default for requests. You have to explicitly specify that a request is allowed to use the master key.

Therefore you can often pass a boolean when calling methods like `get`, `count` and `find`. Find details about method parameters in the [PHP SDK repo](https://github.com/parse-community/parse-php-sdk/blob/master/src/Parse/ParseQuery.php).

**Example**: `public function get($objectId, $useMasterKey = false)`

## Server URL

Directly after initializing the sdk you should set the server url.
Expand Down