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!

xeladu
2 min readSep 15, 2023
Photo by Steve DiMatteo on Unsplash

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!

--

--

xeladu
xeladu

Written by xeladu

Flutter and Firebase expert, blogger on QuickCoder.org, find my ebooks and freebies on shop.quickcoder.org, contact me on me.quickcoder.org!

No responses yet