Skip to Content

How to encrypt an api key

Hello community, i had some while out of the community :(

I'm looking for info be cause i need to use an api

https://developer.mercedes-benz.com/apis/image_api/docs

So an example would be

https://api.mercedes-benz.com/image/v1/vehicles/CODEOFTHEVEHICLE/vehicle?apikey=MY_APIKEY

if i built this url my api key would be exposed ?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 13, 2018 at 05:51 AM

    Well yes, you have only 2 options.

    1. If Mercedes API server allows restricting from which IP they accept API calls, just configure it and restrict only to your server's IP (as Google do)
    2. Use your server as a middleware/dispatcher. Your web app will call your server and only your server will call the Mercedes's API. This is not the best solution because you're putting another entity in the middle.
    Add comment
    10|10000 characters needed characters exceeded

  • Sep 13, 2018 at 01:18 PM

    You dont need to worry about this, once you use SSL, HTTPS connection the url parameters, headers and content are all encrypted already

    Add comment
    10|10000 characters needed characters exceeded