Basic API help in Bubble

Hi,

I am new to creating apps, and am learning so much with Bubble. I really appreciate the value that it creates, and enjoying the process. Currently, I am running into issues with API’s as this is completely new to me.

I am getting the following error. Since I don’t know APIs, and there are at least 2 places int he API connector labeled ‘header’ I don’t know what the error is referring to.

I can not figure out why I am getting this. I have tried filling the ‘header’ with the ‘Content-Type’ and ‘value: application/json’ as described in the BMI video, and I still get the same result. I have also tried with the API token as in the etsy video, and still no go.

If it helps, there is documentation here

link](http://developers.timekit.io/v2/docs/users)

Screenshot of all areas filled

Thank you for any help you can offer!

I believe you need to supply a header called “Timekit-App” - their documentation shows this as an example: ‘Timekit-App: docs’ I would assume that the value (in their example “docs”) would correspond to what you’re looking to access on Timekit (I’m not familiar with the service).

Looks like they provide a simple example (using a UID/PW for authentication) on the “Authentication” page. You’ll need to pass a basic JSON structure, it appears, containing the UID and PW. Looks pretty straight forward, but you’ll need to put this into the Body section of the API Connector call and then modify it (as necessary) in your workflow/call.

1 Like

solved, thank you

Hi @jameslusk, glad to see you solved it.
Let me know if you need help setting up other timekit requests from bubble. I have quite a few of them working and could provide some screenshots etc. :slight_smile:

2 Likes

Thank you so much @pnodseth! Your other posts on this forum have already been extremely helpful. I really appreciate your willingness to help more.

1 Like

Hello Again! Running into a new hurdle. I know this is a super simple thing, but hours of study and troubleshooting so far today have not yielded any result.

I am app tempting to create a basic call to time kit to check for availability. Based on the documentation page there is a UID/PW structure that needs to be followed, which @ezmaass mentioned above. No matter what I do in bubble, the call won’t initialize due to the error ‘invalid credentials’.

The documentation shows this as the proper way to write the UID/PW:

I have tried entering this information so many ways into bubble. I know it should go in the body, but these are all the ways I have tried to put the info in, none of which work:

// attempt 1
{
“email”: “jv@cc.com”,
“password”: “yJcVGdUYfpRJ4efqZZANu8sy0ats7BJO”
}

// attempt 2
jv@cc.com:yJcVGdUYfpRJ4efqZZANu8sy0ats7BJO \

// attempt 3
{
jv@cc.com”: “yJcVGdUYfpRJ4efqZZANu8sy0ats7BJO”

   }

// attempt 4
{
jv@cc.com:yJcVGdUYfpRJ4efqZZANu8sy0ats7BJO”
}

// attempt 5
jv@cc.com”: “yJcVGdUYfpRJ4efqZZANu8sy0ats7BJO”

Thank you for any ideas you have, and being patient with he super noob questions!

1 Like

Put the credentials in the URL, like this: http://email@address.com:APITOKEN@api.timekit.io/v2/calendars
That works for me :slight_smile:

2 Likes

That worked, brilliantly, thank you so much!

Do you know how to Authenticate multiple users with HTTP Basic Auth? Or should I be using a different method? Currently, all of my calls work perfectly, but they only work for one user.

Thanks,
Daniel

You could put dynamic values in the url string, if you save these on the users.

I get the same results for this call when I do this? Did I make an error?