# 🐶 OnlySocial API Walk through

# Authentication

API endpoints are protected, and therefore require that you authenticate using an access token.

## Generate a token

1.  Navigate to your **OnlySocial** dashboard.
2.  Click on Access Tokens from user menu.
3.  Click on Create.
4.  Give it a name, then click on Create.
5.  Copy your token.

<br>

<Accordion title="Screenshots">

 
![image.png](https://api.apidog.com/api/v1/projects/583463/resources/342535/image-preview)

![image.png](https://api.apidog.com/api/v1/projects/583463/resources/342536/image-preview)

<br>

![image.png](https://api.apidog.com/api/v1/projects/583463/resources/342537/image-preview)

<br>

![image.png](https://api.apidog.com/api/v1/projects/583463/resources/342538/image-preview)

<br>
</Accordion>

<br> 
<br>



## Using Your Token


You can authenticate by adding an `Authorization` header to all your HTTP calls. The `Authorization` header is formatted as such: 

`Authorization: Bearer <token>` (replace `<token>` with your token previously generated).

The url for API endpoints within OnlySocial is as follows:

`https://app.onlysocial.io/os/api/*`


**Example:**
    
```js
curl -L -X GET 'https://app.onlysocial.io/os/api/3bbd0951-5b04-432b-b2a0-688588b0720e/accounts' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer myCoolToken'

