> For the complete documentation index, see [llms.txt](https://rareful.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rareful.gitbook.io/documentation/quick-start.md).

# Quick Start

{% hint style="info" %}
**Good to know:** Use this quick start to get up and running in a few steps. Once you've confirmed your authenticated and can make a successful test request, move on to the API Reference.
{% endhint %}

## Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include a valid API key in the header will not be authorized.&#x20;

**Login at api.rareful.io and go to the profile tab to get your api key.**&#x20;

## Make your first request

To make your first request, send an authenticated request to the testConnection endpoint. This will check to see if you're connected and ready to dive in to more documentation.

## Test your API connection

<mark style="color:green;">`POST`</mark> `https://api.rareful.io/v1/testConnection`

Tests your API\_KEY to see if you are connected. Remember that post requests with no parameters still need an empty body like this: {}

{% tabs %}
{% tab title="200 Successfully Authenticated" %}

```javascript
{
    "data": {
        "Authenticated": True
    },
    "status": 200,
    "message": "Congrats you're Authenticated and ready to make requests!"
}
```

{% endtab %}

{% tab title="400: Bad Request Request was malformed or parameters include wrong data types" %}

```javascript
{
    "data": {},
    "status": 400,
    "message": "There was an error"
}
```

{% endtab %}

{% tab title="401 Likely wrong or missing API Key" %}

```javascript
{
    "data": {},
    "status": 401,
    "message": "Not Authorized"
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using different languages and request packages:

{% tabs %}
{% tab title="Python" %}

```python
import requests
import json

API_KEY = "Set your API KEY from your dashboard here"
url = "https://api.rareful.io/v1/testConnection"

payload = json.dumps({})
headers = {
  'API_KEY': API_KEY,
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Node" %}

```javascript
var request = require('request');
var API_KEY = "Set your API KEY from your dashboard here"
var options = {
  'method': 'POST',
  'url': 'https://api.rareful.io/v1/testConnection',
  'headers': {
    'API_KEY': API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({})

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

{% endtab %}

{% tab title="curl" %}

```markup
 curl --location --request POST 'https://api.rareful.io/v1/testConnection' \
--header 'API_KEY: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{}'
```

{% endtab %}

{% tab title="Swift" %}

```swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var API_KEY = "Set your API KEY from your dashboard here"
var semaphore = DispatchSemaphore (value: 0)

let parameters = "{}"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://api.rareful.io/v1/testConnection")!,timeoutInterval: Double.infinity)
request.addValue(API_KEY, forHTTPHeaderField: "API_KEY")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()
```

{% endtab %}
{% endtabs %}
