Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![karan Badhwar](https://secure.gravatar.com/avatar/cc6b8912184a3f8fc42420983065b702?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
karan Badhwar
Web Development Techdegree Graduate 18,135 PointsIs promise is an API
I am not getting it, how promise Object is an API now, I am getting very confused with this whole API situation, what I believe API is what creates a connection between Two networks or computers, but what does it mean now by promise API? Can somebody please explain me this ?
1 Answer
![Joe Elliot](https://uploads.teamtreehouse.com/production/profile-photos/11668607/micro_Screen_Shot_2022-01-31_at_19.50.07.jpg)
Joe Elliot
5,330 PointsI found this a bit confusing as well. After my research this what I understand so far (I could be completely wrong).
You're right that the API is a way for two things to communicate more seamlessly.
"An API (Application Programming Interface) is a set of functions that allows applications to access data and interact with external software components, "
They give the example that if you made an app for an iPhone, you wouldn't need to programme how the iPhone camera works. You could just use the camera API.
So in this case, you're using the Promise API, which in itself is a set of functions that does some of the hard work of sending and receiving requests.
karan Badhwar
Web Development Techdegree Graduate 18,135 Pointskaran Badhwar
Web Development Techdegree Graduate 18,135 PointsHI Joe Elliot, thankyou so much for the explanation. Just to make sure, I get it, you mean to say, API works for the asynchronous work inside a program or a software as well, that means API is a mediator for every thing that runs over the Internet or network. In this case Promise is just like the XMLHTTPRequest Object that offers other methods that help us to get the connection for AJAX request, Is my understanding right?
Joe Elliot
5,330 PointsJoe Elliot
5,330 PointsYes Karan, I believe you're right!
This website has a really good explanation: https://www.ibm.com/cloud/learn/api "APIs sit between an application and the web server, acting as an intermediary layer that processes data transfer between systems."
karan Badhwar
Web Development Techdegree Graduate 18,135 Pointskaran Badhwar
Web Development Techdegree Graduate 18,135 Pointshey Joe Elliot , thanks a lot brother for the assistance, I really appreciate it.