API Connector - The Oauth2 API is not configured properly - MISSING_INFO

I’m trying to create an API to query Snowflake using Oauth. I’ve successfully gotten this to work in Postman, but am having trouble translating it to Bubble. I get an error saying "API Connector error: the Oauth2 API is not configured properly - MISSING_INFO. I get this error when I attempt to authenticate (following the instructions found in the “Warning” text at the bottom of my first screenshot (I’ve also tried checking “requesting an access token uses Basic Auth”, but that didn’t work. I also tried returning the token as a querystring.)

Here is my Bubble configuration:

Here is what Postman looks like (which is working fine)

Here is the error I get:
image

Any advice for how to fix my configuration in Bubble?

Hi @mitchel
Try Check “use a generic redirect URL” option to.
Second thing, I dont know how snowflake API exacly works but when connect with Google you need to fill all the inputs in this user agent flow window (scope Field and user profile URL to)

You dont have endpoint for user. You need one and aet corrct fields for ID and email

Hi there - The generic redirect didn’t work. It doesn’t appear Snowflake users a user profile endpoint. Also, I didn’t need to configure a user profile endpoint in Postman for the API to work.

I’m not sure it is helpful, but here is Snowflake’s documentation for setting up an Oauth connection: Configure Snowflake OAuth for Custom Clients — Snowflake Documentation

Again, there is no mention for a user profile endpoint in their documentation… only a login redirect and access token endpoint.

Update: I tried selecting “Token is returned as a querystring”. I got an error, but the error actually provided me with the value that I need. This response is the access_token that I need to use to run my API call.

So the process goes:

  1. I’m redirected to Snowflake to authenticate, as expected.
  2. I enter my credentials and am then redirected back into my product with an access_token that I need to use to execute my query
  3. I need to use this token to run the API call (this is where I’m getting an error and unable to continue)

Screen Shot 2022-07-12 at 4.05.22 PM

There’s a few thing to consider.
A) It seem that requesting a token use Basic auth. You should enable this.
B) If there’s no user endpoint, you need to do the process manually. There’s some example on how to do that on the forum but the main one is: [Showcase] Manual OAuth2 Token Integration

1 Like

Thanks @Jici ! Yeah, I usually have basic auth enabled. Sorry, should have checked that for the screenshot.

I’m working through the documentation for manually configuring an OAuth2 API token call. I still haven’t gotten it to work, but I do understand the steps the author is going through. Snowflakes API is a little different because it doesn’t appear the token is encoded in the URL. Trying to figure out the best way to capture it. Anyway, if I can get a solution, I’ll post here how I did it.

I think you mix the code and the token. The auth url will return a code that you will exchange for token using API Connector.