# Endpoints

## Profile endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/profile/:username`

This fetches the public information of a user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "user": {
    "name": "SamoChat",
    "age": "13 years ",
    "gender": "Male",
    "location": "Søborg, Danmark",
    "SamoCredits": "100.000.319",
    "rank": "Elite",
    "videos": "1",
    "photos": "28",
    "joined": "Member since 2 years ago",
    "about": " What's your idea?: To connect everyone, everywhere in a 💯 % secure and private way  About Me: We are the first Social media to truly respect and guard your privacy. Made in  but based in 🇩🇰  Website: Samochat.net "
  }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The username of a profile can be found in the url. Eg. [samochat.net/profile/samochat](https://samochat.net/profile/samochat)
{% endhint %}

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

```
curl --location -g --request GET 'api.samochat.net/profile/:username' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetProfile("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_profile("SamoChat")

```

{% endtab %}
{% endtabs %}

## Timeline endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/profile/:username/timeline`

This fetches the public posts of a user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "posts": [
    "        SamoChat  says:    7 months ago       We're now on product hunt SamoChatters! 🙌🏾          2 people  like this.        ",
    "        SamoChat  says:    8 months ago        SamoChat VS Facebook              3 people  like this.        ",
    "        SamoChat  says:    1 year ago       Just be yourself without worrying about privacy or preying eyes!  NO ESPIONAGE NO TRACKING NO TO SELLING DATA  GET PRIVACY and FREE SPEECH  SamoChat the ideal social media for the new age! https://nationaltelegraph.net/samochat-posses-stiff-competition-for-facebook-in-somalia/    The article was written by a SamoChatter by the name Jebril Domenico   Facebook Will Face Stiff Competition From Samochat In Somalia.        2 people  like this.        ",
    "        SamoChat  says:    1 year ago       Hodan Naleyah, was a true Somali who cared for her people, may Allah grant her, her husband and every other victim jannah firdous inshallah, in tribute to her and her spirit of never giving up, we've added a new sticker in her honor :(naagiskadhi): (remove the parenthesis in order to use it)        1 people  like this.        ",
    "        SamoChat  says:    2 years ago       Welcome new SamoChatters! 🙌🏾        3 people  like this.        ",
    "        SamoChat  says:    2 years ago       SamoChatters! new stickers have arrived! You can use the following codes: :(hi: :(bye: :(wow: :(cool: :(oops: :(what: but you must remove the parentheses in order for them to work.              4 people  like this.              SamoChat      January 31, 2019 at 9:11 PM    you can also find them in the more section inside the emoji menu              suldaan cumar      February 1, 2019 at 8:14 AM    :(hi:              Abdirahiim Yassin      February 1, 2019 at 8:52 AM    Wll qawska waan in laga saaro markaasaa shaqeynaysa              Hafsa Yassin      February 1, 2019 at 10:38 AM            "
  ]
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/profile/:username/timeline' \
--header 'Content-Type: application/json' \
--header 'Authorization: access_token'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
   
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetPosts("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_posts("SamoChat")
```

{% endtab %}
{% endtabs %}

## Name endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=name`

This fetches the name of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name | Type   | Description                     |
| ---- | ------ | ------------------------------- |
| name | string | The name of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "name": "SamoChat"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=name' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetName("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_name("SamoChat")
```

{% endtab %}
{% endtabs %}

## Age endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=age`

This fetches the age of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name | Type   | Description                    |
| ---- | ------ | ------------------------------ |
| age  | string | The age of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "age": " 13 years "
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=age' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetAge("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_age("SamoChat")
```

{% endtab %}
{% endtabs %}

## Gender endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=gender`

This fetches the gender of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name   | Type   | Description                       |
| ------ | ------ | --------------------------------- |
| gender | string | The gender of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "gender": "Male"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=gender' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetGender("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_gender("SamoChat")
```

{% endtab %}
{% endtabs %}

## Location endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=location`

This fetches the location of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name     | Type   | Description                         |
| -------- | ------ | ----------------------------------- |
| location | string | The location of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "location": "Søborg, Danmark"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=location' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetLocation("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_location("SamoChat")
```

{% endtab %}
{% endtabs %}

## SamoCredits endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=samocredits`

This fetches the amount of SamoCredits a specific user has.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name        | Type   | Description                            |
| ----------- | ------ | -------------------------------------- |
| samocredits | string | The SamoCredits of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "SamoCredits": "100.000.319"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=SamoCredits' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetSamoCredits("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_samocredits("SamoChat")
```

{% endtab %}
{% endtabs %}

## Rank endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=rank`

This fetches the location of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name | Type   | Description                     |
| ---- | ------ | ------------------------------- |
| rank | string | The rank of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "rank": "Elite"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=rank' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetRank("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_rank"SamoChat")
```

{% endtab %}
{% endtabs %}

## Videos endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=videos`

This fetches the number of videos of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name   | Type   | Description                                 |
| ------ | ------ | ------------------------------------------- |
| videos | string | The number of videos of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "videos": "1"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=videos' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetVideos("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_videos("SamoChat")
```

{% endtab %}
{% endtabs %}

## Photos endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=photos`

This fetches the number of photos of a specified user.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name   | Type   | Description                                 |
| ------ | ------ | ------------------------------------------- |
| photos | string | The number of photos of the specified user. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "photos": "28"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=photos' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetPhotos("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_photos("SamoChat")
```

{% endtab %}
{% endtabs %}

## Joined endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=joined`

This shows when the specified user joined SamoChat.

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| joined | string | Shows the   |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
  "joined": "Member since 2 years ago"
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=joined' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetJoined("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_joined("SamoChat")
```

{% endtab %}
{% endtabs %}

## About endpoint

<mark style="color:blue;">`GET`</mark> `https://api.samochat.net/user/:username?query=about`

This fetches the about section of a specified user

#### Path Parameters

| Name     | Type   | Description                                     |
| -------- | ------ | ----------------------------------------------- |
| username | string | The unique `username` of each SamoChat profile. |

#### Query Parameters

| Name  | Type   | Description                   |
| ----- | ------ | ----------------------------- |
| about | string | The about section of the user |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Authorization | string | The bearer token needed to access the API |

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

```
{
   "about": " What's your idea?: To connect everyone, everywhere in a 💯 % secure and private way  About Me: We are the first Social media to truly respect and guard your privacy. Made in  but based in 🇩🇰  Website: Samochat.net "
}
```

{% endtab %}
{% endtabs %}

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

```
curl --location -g --request GET 'api.samochat.net/user/:username?query=about' \
--header 'Content-Type: application/json' \
--header 'Authorization: {access_token}'
```

{% endtab %}

{% tab title=".NET library" %}

```csharp
using SamoChatNet;
 
SamoChatConfig.ClientID = "ClientID";
SamoChatConfig.ClientSecret = "ClientSecret";
 
 //Declares the instance
 SamoChatData data = new SamoChatData();

 data.GetAbout("SamoChat");
```

{% endtab %}

{% tab title="Python library" %}

```python
import samochat

samochat.client_id = "client_id"
samochat.client_secret = "client_secret"

# Declares the instance
data = SamochatData()

data.get_about("SamoChat")
```

{% endtab %}
{% endtabs %}
