Closed SDanDyS closed 1 year ago
Hmmm.... I'm not sure. Looking at the exception it does seem to come from the Mollie API. I'll have to do some investigating on this. I'll come back on this.
Looking at the API documentation, the endpoint you are calling ("Get current profile") does not support OAuth tokens: https://docs.mollie.com/reference/v2/profiles-api/get-profile-me
The "Get profile" endpoint does support this: https://docs.mollie.com/reference/v2/profiles-api/get-profile
I'm not familiar with the PHP client library.
Well, if only the API key works for a profile, then I doubt the PHP library did this as well. I must've been thinking of something else. But to be sure (debugger already somewhat confirmed this): I can pass an access token to the PaymentClient object and it'll internally handle it, correct?
Jep, that should totally work :)
I'm closing this issue for now. Feel free to reply or open a new issue if you encounter any problems :)
I am implementing Oauth2 and wish to retrieve a profileId, which should be used for payments. However when trying to use Oauth to retrieve a profileId I get the following error "MollieApiException: Forbidden - This API endpoint is only available with an API key and cannot be accessed with an OAuth access token.". In the PHP SDK it's possible to retrieve profiles (including the current profile) through Oauth. Is this also possible within the C# SDK, or hasn't this been implemented yet? The implementation of the retrieval of the profileId is done like this:
am I missing something?