Member-only story
How To Fix API Calls That Always Return 401 With Access Token
I stumbled across a problem when accessing the Gumroad API that always returns 401 when using an access token. Here is a solution for you!
You probably know Gumroad. Many people use it, but rather few know about their API. You can query products, sales, users, and more. They also provide instructions on how to access it properly. Or so I thought, at least. However, the web api always returns 401 HTTP status code (“Unauthorized”) when using the access token.
So, I created the app, obtained the access token, and wrote a small C# app that queries all sales using the RestSharp package. Here is the code:
Fun fact: The following cURL command works!