---
updatedAt: 2025-10-11T20:13:52.000Z
agentTools:
  projectIndex: https://docs.getgreenspark.com/llms.txt
---

# Authentication

Keep your secrets safe.

## Greenspark API

Using the Greenspark API requires each request to have a `X-API-KEY` header containing a Greenspark API key.

It is essential to handle your Greenspark API key as a secret and not to publish it anywhere, since otherwise your data could be accessed and you could be charged for usage.

## Widget API

Using the Widget API requires each request to have a `X-API-KEY` header containing a Widget API key.

You can embed your Widget API key into your application and publish it safely, since it's only used with endpoints providing public data.

 

 

> 🚧 Create your API keys
>
> For an overview on how to create your Greenspark API & Widget API keys head to the [How it works](https://greenspark.readme.io/reference/how-it-works) section.