Make HTTP(S) request from canisters (to reach third party Restful API from back end such as oAuth providers, APIs, etc...)

Hi,

I’m struggling to find a way to request access token from oAuth services directly from Motoko canisters but I couldn’t find yet any example of HTTP client calls directly from Canisters.

For other parts of my app, such as WebRTC signalling, I have seen the “actors” hashMap totally fit my needs, but I need to check identities accros major providers.

In general I would doing it from Serverless functions (Lambda, Netlify functions etc…) with an API Key and a redirect address, but I would like to avoid build a solution on serverless functions stored in majors Cloud Services and do it exclusively from Dfinity if possible.

I would like to first of all if it’s possible to do it directly from a canister with Motoko, or if there is a way to do it with Rust.

Then I would like to know, if I can’t do it from Motoko directly, is it possible to write a part of the app with Motoko (as I find the language way more smoother than Rust), and import a rust library in my motoko project.

Many thanks

PS: here is a related post I have made on stack-overflow: rust - API calls for third party HTTP restful API from dfinity canisters - Stack Overflow

1 Like

I’m not sure this is live yet.

Maybe @dieter.sommer can say more.

I answered it in the main topic for this feature: Enable canisters to make HTTP(S) requests - #96 by dieter.sommer

OK great, I’m happy to hear it will be released in a near future.
Many thanks to you both for yours feedbacks.

1 Like