You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -31,7 +31,7 @@ description: "Create an API key to authenticate your requests"
31
31

32
32
</Frame>
33
33
<Note>
34
-
#### Securing your API key
34
+
**Securing your API key**
35
35
36
36
It is your responsibility to keep your API keys safe and secure. Anyone holding your key will be able to make requests to the API on your behalf.
37
37
Review our [security best practices](/best-practices/security) for information on how to keep your API keys secure.
@@ -48,14 +48,39 @@ Once you have created an API key you can view it on the [API keys page](https://
48
48

49
49
</Frame>
50
50
51
-
## Using the API key
51
+
## Using your API key
52
+
53
+
### The API key header
52
54
53
55
When making requests to the API you will need to include the API key in the request headers. It must be included in the `X-Api-Key` header for all requests.
54
56
55
57
```http
56
58
X-Api-Key: YOUR_API_KEY
57
59
```
58
60
61
+
### Testing your API key
62
+
63
+
You can verify that your API key is working correctly by making a request to the [ping endpoint](/reference/2024-02-05/endpoint/utility/ping). This is a simple health check endpoint that requires authentication but doesn't perform any other operations.
64
+
65
+
```bash
66
+
curl -X GET https://playground.runa.io/v2/ping \
67
+
-H "X-Api-Key: YOUR_API_KEY"
68
+
```
69
+
70
+
If your API key is valid, you'll receive this response:
71
+
72
+
```json
73
+
{
74
+
"message": "pong"
75
+
}
76
+
```
77
+
78
+
If you receive an error, check that:
79
+
80
+
- You've copied the entire API key correctly
81
+
- You're using the correct environment URL (playground or production)
openapi: "/reference/2024-02-05/openapi.json GET /ping"
4
+
---
5
+
6
+
Use the ping endpoint to validate your integration can connect to the Runa API. If you receive a `200 OK` response you have made a successful call to the API with a valid API key.
0 commit comments