I followed the guide of PayPal: https://developer.paypal.com/docs/platforms/get-started/
and made a request to https://api.sandbox.paypal.com/v1/oauth2/token
to obtain an access token.
This works totally fine.
Now I want to do the following request: https://api.sandbox.paypal.com/v1/payments/payment
(Selecting Bearer Auth in Postman, using the token I obtained in the request before)
Now I get the following error response:
{
"name": "REQUIRED_SCOPE_MISSING",
"message": "Access token does not have required scope",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "548db8d53cfde"
}
Yes, I configured my project to allow such things:
I really appreciate any help.
EDITED:
Response from: https://api.sandbox.paypal.com/v1/oauth2/token
{
"scope": "https://uri.paypal.com/services/invoicing https://uri.paypal.com/services/disputes/read-buyer https://uri.paypal.com/services/payments/realtimepayment https://uri.paypal.com/services/disputes/update-seller https://uri.paypal.com/services/paypalhere https://uri.paypal.com/services/payments/payment/authcapture openid https://uri.paypal.com/services/disputes/read-seller https://uri.paypal.com/services/payments/refund https://uri.paypal.com/services/identity/activities https://api.paypal.com/v1/vault/credit-card https://api.paypal.com/v1/payments/.* https://uri.paypal.com/payments/payouts https://api.paypal.com/v1/vault/credit-card/.* https://uri.paypal.com/services/subscriptions https://uri.paypal.com/services/applications/webhooks https://api.paypal.com/v1/payments/refund https://api.paypal.com/v1/payments/sale/.*/refund",
"token_type": "Bearer",
"expires_in": 30189
}
There's no actual issue with your scopes, all are there.
It seems your payment request to https://api.sandbox.paypal.com/v1/payments/payment is incomplete
See here for an example guide for creating a payment: https://developer.paypal.com/docs/integration/direct/payments/paypal-payments/#create-paypal-payment
Be sure to pass a transaction object with an amount, and any other required parameters