- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My question is nearly identical to
but I will explain what the difference is.
It's my first time consuming the PayPal API. I'm following the Quick Start at GitHub https://github.com/paypal/PayPal-NET-SDK/wiki/Quick-Start
My app.confg file
<paypal> <settings> <add name="mode" value="sandbox" /> <add name="clientId" value="***" /> <add name="clientSecret" value="***" /> </settings> </paypal>
My C# code is executing from a test class. The relevant (failing) part of the code is
var config = ConfigManager.Instance.GetProperties(); //returns a dictionary with 3 items var accessToken = new OAuthTokenCredential(config).GetAccessToken(); // fails
Examining the exception shows it is an Identity Exception, and the response is
"{\"error\":\"invalid_client\",\"error_description\":\"Client Authentication failed\"}"
Sadly, this is where I'm now lost. I understand it is saying the issue is the client is invalid, and as such, I initially guessed I have probably provided the wrong ClientID, but I don't feel this is the case.
Within PayPal -> All Tools -> API Credentials I click on Manage API credentials, authenticate myself and see my Client ID and Client Secret. I copy and paste these into my app.config file but the same error messages persists.
Another look at https://github.com/paypal/PayPal-NET-SDK/wiki/Configuration shows that I need to have built a webapp. Sadly, the links in that document do not work so, I'm now lost. Am I supposed to get the auth details as I described above, or do I still need to create a webapp within PayPal?
Solved! Go to Solution.
- Labels:
-
Payments REST APIs
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Change the button from Sandbox to Production in PayPal Payments Standard
- Handling payouts that are being on hold/blocked in REST APIs
- Re: Enable the return of billing address in Sandbox Environment
- Cart dropps items, fails to return customer to previous window in PayPal Payments Standard
- why can't I have auto return on standard buttons in PayPal Payments Standard