has anyone experience the error “Unsupported Media Type” when using the API connector?
not sure what is going on, but it is a basic general POST request. can delve further into the specifics if needed, but initially i am just wondering if anyone has seen this error and possibly why, if known?
Hi @Jici,
this is occurring when initiating with my own account in quickbooks, the calls are built using their API documentation…not sure why they are not working with bubbles api connector?..i would be happy to build this using bubbles oauth2 authentication methods, ie. password, user-agent, or custom token flow,
but couldn’t find any documentation from bubble to help build it out?
here are the settings for each call in my API connector…
There’s a lot of step in (create your app first in QBO dev portal).
Actually, you are not setting your call correctly.
I suggest to try the oauth process
Authorize url is: https://appcenter.intuit.com/connect/oauth2
Token is: https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer
Not sure if this is possible directly. If not, you need to create your own step by step like you started but actually, you are missing the authorize part (and store the response with the current user…)
Thanks @Jici,
yes, have already built the app in QB dev, done the initialisation through a workflow in bubble (see below) and obtained the necessary code to access my QB built dev app!!
here is the workflow…
the code is then stored and used in the API connector call
If you authenticate with oauth2 in Bubble, bubble will handle the refresh for you. But there’s case that this may not work. Never tested with this one.
I made it work with the API Connector, but the refresh token doesn’t seem to stick. I’m wondering if it’s a API Connector bug or it’s a “feature” of Intuit’s. I’ve opened a ticket with Bubble to see if they could help me out.
@Jici you seem knowledgeable. Is it possible to debug the API Connector? Can I peep into the API Connector and try to figure out why it’s not saving the refresh_token?
I don’t remember exactly for QBO but I’ve done this in the past. Actually I don’t have access to the app I’ve implemented this so I don’t remember if I use the native API Connector oAuth2 process or a manual one.
Do you have more than 1 oAuth2 for your user in this app? Example, a user create an account using Google Auth and can also connect with QBO Auth? If this is the case, it won’t work because Bubble can only handle one refresh token for user from my old testing (it may have change since, but more than 18 month ago, I’ve tested this with 2 and 3 oAuth at the same time for the same user and found that Bubble doesn’t handle this correctly. But no problem once at a time).
I wasn’t even thinking about logging in with QBO. So, to answer your question, no is not for various login OAuth2s.
All I’m trying to accomplish is to have Bubble use my credentials to do some stuff in QBO.
You mentioned something about using Custom Token. I’ve done this successfully with Zoho in the past, but I can’t get it to work with QBO. Would you guess this is a good route for my case?
Not custom token but just manually handled. Mean that you call the Authorization link in a button and when it’s back in your Workflow, you use Get data from url and finally use API Call to Get Token. Store it in DB and manually refresh it using two ways: With a Backend workflow scheduled or with a condition that if the API call fail because of expired token, get a new one using the refresh token.
You cannot use the Bubble native oAuth2 because the refresh token is related to a specific user but from what I understand you will only use your own account. So you need to manually handle each part.
Good call @Jici
yes, @rico.trevisan this is the most foolproof way of running the refresh token; save it into your data (a single refresh token and a single auth/access code)
below is using bubbles api connector to refresh the token (make sure to save both the refresh token and auth access code in your workflows) and then use the auth code returned (with Bearer ) to create a user (or any calls) in QB: