Get permission
Permissions API

GET
https://api.mollie.nl/v1/permissions/id
Authentication: OAuth access tokens

All API actions through OAuth are by default protected for privacy and/or money related reasons and therefore require specific permissions. These permissions can be requested by apps during the OAuth authorization flow. The Permissions resource allows the app to check whether an API action is (still) allowed by the authorization.

Parameters

Replace id in the endpoint URL by the permission's ID, for example payments.read. See OAuth: Permissions for details about the available permissions.

Includes

Some endpoints allow you to indicate if you want more information to be included in the API response via the include querystring parameter.

  • No includes supported for this endpoint.

Response

200
application/json; charset=utf-8
resource
string

Indicates the response contains a permission object.

Possible values: permission

id
string

The permission's identifier. See OAuth: Permissions for more details about the available permissions.

Possible values: apikeys.read apikeys.write customers.read customers.write mandates.read mandates.write organizations.read organizations.write payments.read payments.write profiles.read profiles.write refunds.read refunds.write settlements.read

description
string

A short description of what the permission allows.

warning
string

Optional – A mandatory warning message when necessary.

granted
boolean

Whether this permission is granted to the app by the organization or not.

Example

Request code

require_once 'Mollie/API/Autoloader.php';

try
{
    $mollie = new Mollie_API_Client;
    $mollie->setAccessToken('access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ');

    $permission = $mollie->permissions->get('payments.read');

    echo $permission->id . ': ' . $permission->description;
}
catch (Mollie_API_Exception $e)
{
    echo "API call failed: " . $e->getMessage();
}

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    resource: "permission",
    id: "payments.read",
    description: "View your payments",
    warning: null,
    granted: true
}