# Getting a CAPTCHA on the API authorize URL

**URL:** https://www.patreondevelopers.com/t/getting-a-captcha-on-the-api-authorize-url/2795
**Category:** API Feedback
**Created:** [February 22, 2020, 8:47pm UTC](https://www.patreondevelopers.com/t/getting-a-captcha-on-the-api-authorize-url/2795 "2020-02-22T20:47:47Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![localjo](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/localjo/32/1136_2.png) [@localjo](https://www.patreondevelopers.com/u/localjo)
#### Post date: [February 25, 2020, 12:25pm UTC](https://www.patreondevelopers.com/t/getting-a-captcha-on-the-api-authorize-url/2795/9 "2020-02-25T12:25:26Z")

</div>

Hi @Jackie_Bow I’m traveling in Las Palmas, Spain. Unfortunately, I don’t have a static IP address right now. But my end goal here is not to get the request working on my machine (that’s just so I can debug the problem). My end goal is to [set up an OAuth connection between Patreon and Auth0](https://auth0.com/docs/extensions/custom-social-extensions), but I was having trouble getting it to work.

I figured it out today, and it looks like there were a few problems. Posting my solution here in case anyone else needs it.

I had to fill out Auth0’s Custom Social Connection form like this:

 ![Screen Shot 2020-02-25 at 11.49.30 AM](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/1/1ae112e111364cd2ad92c31d4870c097b9f690bf.png)

The first thing I was missing were the Custom Headers, since that [isn’t mentioned in the Patreon documentation](https://docs.patreon.com/#oauth). This is the value I used;

```auto
{
 "Content-Type" : "application/x-www-form-urlencoded",
 "User-Agent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36"
}

```

When I did that, I started getting the following error;

```auto
{"error":"invalid_request","error_description":"Mismatching redirect URI.","state":"xxxxxx"}

```

So I realized that in order to get a Patreon client to authenticate correctly with Auth0, I need to add Auth0’s redirect URL to my Patreon client: `https://{my-auth0-subdomain}.auth0.com/login/callback`

This gets me to the Patreon confirmation dialog, and redirects back to Auth0, but then I see the following error in Auth0, so it looks like something is still wrong;

```auto
{
  "statusCode": 403,
  "data": "{\"error\":\"invalid_grant\",\"error_description\":\"Invalid authorization code\"}"
}

```

---

_[View the full topic](https://www.patreondevelopers.com/t/getting-a-captcha-on-the-api-authorize-url/2795)._
