ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.5k stars 568 forks source link

API for custom web app #103

Closed herman-rogers closed 6 years ago

herman-rogers commented 6 years ago

Is your feature request related to a problem? Please describe. Just a question really, wondering if there's an API I can use specifically to build my own custom web app for. Essentially I have some custom needs and would like to just build it.

Describe the solution you'd like Just an API where I can access my account.

Describe alternatives you've considered Adding my changes to the WebClient, although my changes are more for myself rather than for the wider community.

dhoko commented 6 years ago

Hey :wave:

I don't understand when you run the webclient (via $ npm start) we attach it to this API 'https://mail.protonmail.com/api'. It's our live API, so you're able to use your account. What is your issue ?

herman-rogers commented 6 years ago

Nah I just mean, can I create a third party app just for myself and still use the API? It sounds like I can from your comment.

dhoko commented 6 years ago

Yup :+1:

bartbutler commented 6 years ago

You might have trouble if you host it somewhere other than localhost or private IPs though, as the API will enforce CORS via the Origin header. You could get around this with an appropriate proxy though.

herman-rogers commented 6 years ago

I can just host it on an IP address - not really planning to host it on anything fancy. Worst case I’ll proxy it - cheers though.

justinkalland commented 5 years ago

Aloha @herman-rogers. A little late but I was also looking for an easy API library and couldn't find one, so I created it: justinkalland/protonmail-api