PayPal REST API OAuth2 Authentication

There’s a lot of confusion about exactly what login/password (or clientID/clientSecret) is to be used for obtaining an OAuth2 access token for PayPal REST API calls.

PayPal uses simple HTTP Basic authentication (protected by a TLS connection) to obtain an access token.   Using the Chilkat Rest library, your application would provide the credentials in this way (in pseudo-code)

rest.SetAuthBasic("CLIENT_ID", "API_SECRET");

So… where exactly does one get the CLIENT_ID and CLIENT_SECRET???

Go to https://developer.paypal.com/developer/accounts/

Click on the “Profile” link for one of your Sandbox accounts.  Then go to the “API Credentials” tab.  You’ll see the following.
(Note: You should have first defined/created a REST app within your PayPal account.  You’ll see it here.  In my case, the name of my REST App is “Chilkat”.  Yours will be whatever you named it.)

Next, click on your REST App.  You’ll see this:

The Client ID and API Secret are the values that should be passed to rest.SetAuthBasic.

Constructing the Authentication Header for Amazon S3 (Simple Storage Service)

Here are examples for creating the HTTP Authorization header for Amazon S3 requests:

ASP: HMAC SHA1 for Amazon S3
SQL Server: HMAC SHA1 for Amazon S3
C#: HMAC SHA1 for Amazon S3
Delphi: HMAC SHA1 for Amazon S3
Visual FoxPro: HMAC SHA1 for Amazon S3
Java: HMAC SHA1 for Amazon S3
Perl: HMAC SHA1 for Amazon S3
PHP: HMAC SHA1 for Amazon S3
Python: HMAC SHA1 for Amazon S3
Ruby: HMAC SHA1 for Amazon S3
VB.NET: HMAC SHA1 for Amazon S3
Visual Basic: HMAC SHA1 for Amazon S3
VBScript: HMAC SHA1 for Amazon S3