Get permission¶
Permissions API v2
GET
https://api.mollie.com/v2/permissions/*id*
Authentication:Organization access tokensApp access tokens
Retrieve the details on a specific permission, and see if the permission is granted to the current app access token.
Parameters¶
Replace id
in the endpoint URL by the permission’s ID, for example payments.read
. See
Permissions for details about the available permissions.
Response¶
200
application/hal+json
resource
string
Indicates the response contains a permission object. Will always contain
permission
for this endpoint.id
string
The permission’s unique identifier, for example
payments.read
description
string
A short description of what the permission allows.
granted
boolean
Whether this permission is granted to the app by the organization or not.
_links
objectAn object with several URL objects relevant to the permission. Every URL object will contain an href
and a
type
field.
self
URL object
The API resource URL of the permission itself.
documentation
URL object
The URL to the permission retrieval endpoint documentation.
Example¶
cURLPHPPythonRubyNode.js
1 2 | curl -X GET https://api.mollie.com/v2/permissions/payments.read \ -H "Authorization: Bearer access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ" |
1 2 3 4 | <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setAccessToken("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ"); $permission = $mollie->permissions->get("payments.read"); |
1 2 3 4 5 6 | from mollie.api.client import Client mollie_client = Client() mollie_client.set_access_token("access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ") permission = mollie_client.permissions.get("payments.read") |
1 2 3 4 5 6 7 | require 'mollie-api-ruby' Mollie::Client.configure do |config| config.api_key = 'access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ' end permission = Mollie::Permission.get('payments.read') |
1 2 3 4 | We don't have a Node.js code example for this API call yet. If you have some time to spare, feel free to share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
Response¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | HTTP/1.1 200 OK Content-Type: application/hal+json { "resource": "permission", "id": "payments.read", "description": "View your payments", "granted": true, "_links": { "self": { "href": "https://api.mollie.com/v2/permissions/payments.read", "type": "application/hal+json" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/permissions-api/get-permission", "type": "text/html" } } } |