top | item 16221067

(no title)

xrjn | 8 years ago

I built a microservice that does something similar[0] for Mailchimp. They have an API that requires a secret key, but we didn't want to keep a server running for it (and obviously didn't want anyone on the internet playing with our key). So I set up a little python service that serves a page and 'proxies' the API to the end user.

[0] https://github.com/sasha42/Mailchimp-utility

discuss

order

verst|8 years ago

Very nice!

You could also do this simply by running on Azure Functions (free consumption plan). All you need to deploy is a simple proxies.json, see [1].

On the AWS side it appears you can entirely use API Gateway. Here [2] is a Swagger 2.0 definition file I just wrote which upon import creates an API endpoint that should proxy requests to an external API while adding your secret credentials.

[1]: https://aka.ms/apiproxy [2]: https://gist.github.com/berndverst/b59fa0b38544f13c05ae0b77f...