Forum Discussion

vasubr's avatar
vasubr
Guide
9 years ago

Calling external REST API from Lithium

I have a requiremnt to call an external REST API From the Lithium platform. I am not able to find any documentation on this. I had asked this question to Lithium support and they suggested that I post here. Thanks in advance.

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)

    vasubr it really depends on what your requirements are (apart from calling an external API) ...

     

    You could look at using Javascript and load it on your community pages.

    Or use an endpoint and the http.client context object

    • vasubr's avatar
      vasubr
      Guide
      This solution will work for us, an additional question is, if there is authorization needed for the call, where do I need to store the certs, can I do that on my own?
      • OlivierS's avatar
        OlivierS
        Lithium Alumni (Retired)

        vasubr I'm not an authentication / authorization expert. From what I know, Lithium uses a 'one way' SSL, which I think only applies when using the OAuth 2.0.

        If for some reason you need to add the certificate in your development environment, you can get our certificate using this command: 

         

        openssl s_client -connect eu.api.lithium.com:443

         

        I hope it helps!