I have had successes connection APIs with simple https URLs in the past, however I am wondering how to connect an API using a different method. For example, I am trying to work with the Alchemy API in Bubble.io - is this possible?
Link to the getting started document: Getting Started - Alchemy Documentation
Thank you.
Thanks for the screenshot.
Do you mind clarifying what’s above the screenshot (where I put Authentication and Key value)?
I am trying to get data from their NFT API (https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-quickstart-guide) - would it follow the same steps?
I just plugged in everything for their example request on the link you shared above.
I just found this so it looks like you would just replace the url I had in with the specific one you need to use per action.
Go to this link https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/nft-api-quickstart-guide#javascript-fetch and you will be able to see here is a url for getNFTs and just look at the example to see what parameters you will need to pass in bubble.
Here is how the connection would look for the getNFTs example
Obviously I used demo but you should just use your own api key and then i’m assuming owner would be dynamic and something you would have access to in bubble.
Basically any API is an https request so you just need to know the URL, the headers, if any, and the data that you will be sending and how it should be formatted. Bubble’s API connector gives you everything you should need for any request.
This is great - I got it working so far.
A few follow up questions:
-
Is this correct? Since we have the API Key in the GET, it’s not needed under “Authentication”?
-
What is the reasoning for "Headers, Key, Content-Type, etc… and how can I keep an eye out for when this is needed for future APIs I work with?
-
Lastly, I would like “owner” to be taken dynamically from my Bubble.io database but I can’t leave owner blank and if I have an address as a placeholder, it shows it on the page and not the other data.
Thank you for your help.
Thanks for suggestions. Everything seems to be working.