Skip to main content

Greip Dashboard – Protecting your API Key

Overview

In order to use this service you have to obtain an API Key (You will have it once you open a new account). This is the secret key that will be used to send the requests to our API. As we mentioned above, it’s a SECRET KEY. So, you cannot share it with others. In some cases you may need to expose this key in client-side code. In those cases, limit where the key may be used by adding authorized hosts (domain names and/or IP addresses).

Whitelisting your hosts

If a request does not come from a host on your list, Greip rejects it with domain_not_whitelisted (113) and the call does not deduct quota.
1

First Step

Go to Settings → Authorized hosts. Add or remove domains and IP addresses from the table; use Add host to create a new entry.
You can enter domain names and/or IP Addresses.For example: you call the API from a browser with our JS package on example.com and from your server with the PHP library at 203.0.113.10. Add both the domain and the server IP.
Important Notes
  1. If you use subdomains, list each one you call from.
  2. If your server sits behind Cloudflare or another reverse proxy, whitelist the origin server IP, not only the proxy edge.
  3. An empty authorized hosts list allows requests from any domain or IP address.
Plan limits apply to how many hosts you can save. The dashboard shows remaining slots on the Authorized hosts tab.