# Legitimate Universal Bio API

This API allows users to verify articles and domains; extracting information about them. The main endpoint is:

1. `'https://www.legitimate.net/api/verify_article'` - Verifies an article and retrieves detailed information about it.\
   \
   **More endpoints will be launching in the coming weeks.**&#x20;

### Onboarding

To be able to make API calls you need to have a Legitimate profile. \
\
After creating a Legitimate profile visit <https://www.legitimate.net/apis.html> (available in the footer) where you can sign up for an API account.&#x20;

<figure><img src="https://330516961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHH-1LNVRGesTpz73RW%2Fuploads%2FXhi6dTagftm5ANyURS6v%2Fapi-account.png?alt=media&#x26;token=d1fe0650-d699-4ef2-b116-06bfce00943d" alt=""><figcaption></figcaption></figure>

Once you sign up for an account your API credentials will be available in your settings area under "API Settings" tab.&#x20;

![API credentials](https://330516961-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHH-1LNVRGesTpz73RW%2F-MkMTIOVvvt7hPZczeMN%2F-MkMXBGlRjV3RzP6yK4S%2FScreenshot%202021-09-24%20at%2012.19.49.png?alt=media\&token=60d629f5-98a4-463f-a015-72638b1a3b4d)

#### Authentication

To authenticate your call you need to use a Bearer Token made up from your API key and secret.&#x20;

```
Uivayfc1Tvk2SED6rEohPvGt:8XCjPrzqCZ11r554JPWDn26g
```

####

## Verify Article

<mark style="color:green;">`POST`</mark> `https://www.legitimate.io/api/verify_article`

#### Query Parameters

| Name | Type   | Description                                       |
| ---- | ------ | ------------------------------------------------- |
| url  | string | The url of the article or post you wish to verify |

#### Headers

| Name           | Type         | Description                                                                                                |
| -------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Authentication | Bearer Token | Authentication is based on a bearer token comprised of your API key and API secret separated with a colon. |

```markup
ABiuhfU7vWNxDFGebnZWtg6K:WoKdUawkLGozQzeMwpczYUAd
```

## Fields:

| Field Name                | Description                                                                                                                                                                   | Example                                                                                 | Type                       |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------------------------- |
| verified                  | Indicates if the profile is verified                                                                                                                                          | true                                                                                    | boolean                    |
| type                      | The "type" field can help you determine the way to handle the response. There are 4 main response types: Article Verified, Domain Verified Plus, Domain Verified, Unverified. | Unverified                                                                              | String                     |
| profile\_first\_name      | First name of the profile owner                                                                                                                                               | Gerard                                                                                  | string                     |
| profile\_last\_name       | Last name of the profile owner                                                                                                                                                | Donnelly                                                                                | string                     |
| profile\_title            | Title of the profile owner                                                                                                                                                    | Founder                                                                                 | string                     |
| profile\_created\_at      | Timestamp when the profile was created                                                                                                                                        | 2020-04-08T19:52:31.704Z                                                                | string (ISO 8601 datetime) |
| profile\_bio              | Biography of the profile owner                                                                                                                                                | I am passionate about journalism and the fight against disinformation...                | string                     |
| profile\_employer         | Employer of the profile owner                                                                                                                                                 | Legitimate                                                                              | string                     |
| profile\_residing         | Places where the profile owner resides                                                                                                                                        | Belfast, London                                                                         | string                     |
| profile\_slug             | Unique identifier for the profile                                                                                                                                             | gerard-donnelly                                                                         | string                     |
| profile\_image            | URL to the profile image                                                                                                                                                      | <https://www.legitimate.net/.../Screenshot%202022-07-29%20at%2019.29.49.png>            | string (URL)               |
| profile\_social\_profiles | Social media profiles of the profile owner                                                                                                                                    | { "twitter": "gdonnelly82", "linkedin": "gerard-donnelly", "instagram": "gdonnelly82" } | object                     |
| user\_location            | Location of the user                                                                                                                                                          | United Kingdom                                                                          | string                     |
| user\_city                | City of the user                                                                                                                                                              | Belfast                                                                                 | string                     |
| follower\_count           | Number of followers                                                                                                                                                           | 11                                                                                      | integer                    |
| article\_count            | Number of articles written by the profile owner                                                                                                                               | 18                                                                                      | integer                    |
| awards                    | Awards received by the profile owner                                                                                                                                          | ""                                                                                      | string                     |
| memberships               | Memberships of the profile owner                                                                                                                                              | ""                                                                                      | string                     |
| articles                  | List of articles written by the profile owner                                                                                                                                 | \[ {...}, {...}, {...} ]                                                                | array of objects           |
| domain\_info              | Information about the domain                                                                                                                                                  | {}                                                                                      | object                     |

**For the nested `articles` array, each object within it has the following fields:**

| Field Name    | Description                                 | Example                                                                                                             | Type                       |
| ------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| id            | Unique identifier for the article           | 1747781                                                                                                             | integer                    |
| title         | Title of the article                        | The role of Local News in countering misinformation                                                                 | string                     |
| description   | Description of the article                  | Local newspapers are crucial in combating misinformation by providing verified...                                   | string                     |
| link          | URL to the article                          | <https://blog.legitimate.net/.../the-role-of-local-news-in-countering-misinformation/>                              | string (URL)               |
| og\_image     | URL to the Open Graph image for the article | <https://blog.legitimate.net/.../local-news-misinformation.jpg>                                                     | string (URL)               |
| icon\_path    | URL to the icon image for the article       | [https://legitimate.net//assets/legitimate-logo-small.png](https://legitimate.net/assets/legitimate-logo-small.png) | string (URL)               |
| published\_at | Timestamp when the article was published    | 2024-04-23T23:47:00.000Z                                                                                            | string (ISO 8601 datetime) |
| tag\_list     | List of tags associated with the article    | \[ "Legitimate" ]                                                                                                   | array of strings           |

For the nested `domain_info` object, the table is as follows:

| Field Name             | Description                                                          | Example                                                                                              | Type             |
| ---------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------- |
| publication\_name      | Name of the publication                                              | Advocate Media - Dallas                                                                              | string           |
| domain                 | The domain name                                                      | advocatemag.com                                                                                      | string           |
| description            | Description of the publication. **This is a max of 200 characters.** | A local publication delivering neighborhood news, culture, and events...                             | string           |
| year\_founded          | Year the publication was founded                                     | 1991                                                                                                 | integer          |
| bodies\_associations   | List of associations and bodies the domain is part of                | \[ { "accrnym": "LION", "name": "Local Independent Online Media", ... }, { "accrnym": "INN", ... } ] | array of objects |
| publisher              | Publisher of the publication                                         | null                                                                                                 | null             |
| publisher\_description | Description of the publisher. **This is a max of 200 characters.**   | null                                                                                                 | null             |
| country                | Country where the publication is based                               | USA                                                                                                  | string           |
| city                   | City where the publication is based                                  | Dallas                                                                                               | string           |
| state                  | State where the publication is based                                 | TX                                                                                                   | string           |
| logo\_path             | URL to the logo image of the publication                             | <http://legitimate.net/images/publications/advocatemag.png>                                          | string (URL)     |
| registration\_data     | Information about the domain registration                            | { "registrant\_name": "REDACTED FOR PRIVACY", "registrant\_country": "UNITED STATES", ... }          | object           |

For the nested `bodies_associations` array within `domain_info`, each object has the following fields:

| Field Name          | Description                                                                  | Example                                         | Type         |
| ------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------- | ------------ |
| acronym             | Acronym of the body or association                                           | LION                                            | string       |
| name                | Name of the body or association                                              | Local Independent Online Media                  | string       |
| description         | Description of the body or association. **This is a max of 200 characters.** | Lion provides great stuff                       | string       |
| profile\_image\_url | URL to the profile image of the body or association                          | <https://legitimate.net/images/bodies/lion.png> | string (URL) |

For the nested `registration_data` object within `domain_info`, the table is as follows:

| Field Name          | Description                           | Example              | Type              |
| ------------------- | ------------------------------------- | -------------------- | ----------------- |
| registrant\_name    | Name of the domain registrant         | REDACTED FOR PRIVACY | string            |
| registrant\_country | Country of the domain registrant      | UNITED STATES        | string            |
| registrar\_company  | Registrar company of the domain       | ENOM, INC.           | string            |
| domain\_created     | Date when the domain was created      | 1996-07-29           | string (ISO date) |
| domain\_updated     | Date when the domain was last updated | 2023-07-23           | string (ISO date) |

#### Example call

```
https://www.legitimate.net/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-do-enough-to-combat-fake-news
```

Always try to include ***https\:// or http\://*** in the query string. <br>

### Response Types

The "type" field can help you determine what way to handle the response.&#x20;

There are 4 main response types:

1. **Article Verified:** The article and author are verified.
2. **Domain Verified Plus:** The article is not verified but the domain is verified and additional information is supplied such as other journalists (up to 3) that write for that publication and the latest articles (3).&#x20;
3. **Domain Verified:** The article is not verified but we can verify the domain and provide domain information.&#x20;
4. **Unverified:** Both the article and the domain are not verified. We will then supply additional context and details regarding the domain.  &#x20;

{% tabs %}
{% tab title="Article Verified" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "verified": true,
    "type":"Article Verified",
    "profile_first_name": "El",
    "profile_last_name": "Calabrese",
    "profile_title": "News Reporter/News Producer/Writer/Video/Photo/Project Manager/Legal Clearance and Compliance",
    "profile_created_at": "2023-12-23T22:12:55.272Z",
    "profile_bio": "I'm Hunter's pet and occasionally his seat. I also do many things media-wise and am a daily newshound tooling about the northeast region. Let me know if we might be able to help one another...",
    "profile_employer": "Freelance",
    "profile_residing": "",
    "profile_slug": "el-calabrese",
    "profile_image": "https://www.legitimate.net/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBOUY5RGc9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--5b51624bf50ecb5065805100a8ac0b9701dc8f25/IMG_4462.jpeg",
    "profile_social_profiles": {},
    "user_location": "US",
    "user_city": "NY",
    "follower_count": 0,
    "article_count": 3,
    "awards": "",
    "memberships": "",
    "articles": [
        {
            "id": 1634752,
            "title": "Baby Nikolai's death is not a result of bone disease, prosecutors say",
            "description": "Bail was denied Wednesday for Quincy Pierre, held in the death of an 11-week-old baby.",
            "link": "https://www.insider.com/baby-nikolais-death-homicide-not-result-bone-disease-prosecutors-say-2023-11",
            "og_image": "https://i.insider.com/654c227436d588dc55cd844f?width=780&#x26;format=jpeg",
            "icon_path": "https://www.insider.com/public/assets/INSIDER/US/favicons/favicon.svg?v=2023-11",
            "published_at": "2023-11-08T19:10:00.000Z",
            "tag_list": [
                "Crime"
            ]
        },
        {
            "id": 1634750,
            "title": "Journey of a Bullet: Survivors describe what happens after you’re shot",
            "description": "Six men and women describe what it’s like to be shot and cope with the enduring trauma.",
            "link": "https://www.nbcnews.com/specials/journey-of-a-bullet",
            "og_image": "https://nodeassets.nbcnews.com/cdnassets/projects/journey-bullet-vids01/job-share-img.jpg",
            "icon_path": "https://www.nbcnews.com/../_assets/images/appicon192.png",
            "published_at": "2017-06-20T00:00:00.000Z",
            "tag_list": [
                "NBC News",
                "specials",
                "reporting"
            ]
        },
        {
            "id": 1634751,
            "title": "Orlando Gay Clubs Come Together to Support Pulse Staff",
            "description": "The Orlando LGBT community is pulling together to support the staff of Pulse, who have found themselves without a way to pay the bills.",
            "link": "https://www.nbcnews.com/storyline/orlando-nightclub-massacre/orlando-gay-clubs-come-together-support-pulse-staff-n593281",
            "og_image": "https://media-cldnry.s-nbcnews.com/image/upload/t_fit-1500w,f_auto,q_auto:best/newscms/2016_24/1580656/160615-pulse-nightclub-01-jsw-642p.JPG",
            "icon_path": "https://nodeassets.nbcnews.com/cdnassets/projects/ramen/favicon/nbcnews/all-other-sizes-PNG.ico/favicon.ico",
            "published_at": "2016-06-15T20:51:00.000Z",
            "tag_list": [
                "News"
            ]
        }
    ],
    "domain_info": {
        "publication_name": "Insider",
        "domain": "insider.com",
        "description": "Insider.com offers a mix of original reporting and aggregated content on topics like business, tech, politics, and lifestyle, aiming to provide fascinating stories for enterprising readers",
        "year_founded": 2007,
        "domain_age": null,
        "bodies_associations": null,
        "publisher": "Axel Springer",
        "publisher_description": "Axel Springer is Europe's largest newspaper publisher.",
        "country": "USA",
        "city": "Arlington",
        "phone": null,
        "state": "Virginia",
        "logo_path": null,
        "registration_data": {
            "registrant_name": "PERFECT PRIVACY, LLC",
            "registrant_country": "UNITED STATES",
            "registrar_company": "Register.com, Inc.",
            "domain_created": "1997-06-06",
            "domain_updated": "2021-12-11"
        }
}

</code></pre>

{% endtab %}

{% tab title="Domain Verified Plus" %}

```json
{
    "verified": true,
    "type": "Domain Verified Plus",
    "domain": "politico.com",
    "similar_article_count": 312,
    "similar_profile_count": 23,
    "similar_articles": [
        {
            "id": 1371846,
            "title": "Judge scolds Jack Smith’s team for causing delay in unrelated Jan. 6 verdict",
            "link": "https://www.politico.com/news/2023/07/20/trump-grand-jury-witness-executive-privilege-00107442",
            "og_image": "https://static.politico.com/f9/a7/d599538f48a4b22c2df24c6b6b29/trump-classified-documents-96524.jpg",
            "icon_path": "https://legitimate.net/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaUNuIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--1838f2e3bf112de00dbdd41e946b502ef8665338/politico.png",
            "published_at": "2023-07-20T19:29:57.000Z"
        },
        {
            "id": 1371848,
            "title": "Judge rejects QAnon shaman’s bid to throw out Jan. 6 sentence",
            "link": "https://www.politico.com/news/2023/07/20/judge-rejects-qanon-shamans-bid-to-throw-out-jan-6-sentence-00107370",
            "og_image": "https://static.politico.com/1d/31/e55b1cc84020b8ecd42d22c0f6ad/capitol-breach-apologies-20816.jpg",
            "icon_path": "https://legitimate.net/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBaUNuIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--1838f2e3bf112de00dbdd41e946b502ef8665338/politico.png",
            "published_at": "2023-07-20T16:29:53.000Z"
        },
        {
            "id": 1372224,
            "title": "Biden’s legacy long game: Rain regulations — now",
            "link": "https://www.politico.com/news/2024/05/20/biden-agencies-protect-rules-trump-00158732",
            "og_image": "https://static.politico.com/7c/31/7c6f37bc46e2a91d4a80de2d4858/useuntil06-08-2024-020.jpg",
            "icon_path": "https://static.politico.com/cf/05/ee684a274496b04fa20ba2978da1/politico.png",
            "published_at": "2024-05-21T05:00:00.000Z"
        }
    ],
    "similar_profiles": [
        {
            "id": 1648,
            "slug": "kyle-cheney",
            "first_name": "Kyle",
            "last_name": "Cheney",
            "job_title": "Reporter",
            "employer": "Politico",
            "profile_image_url": "https://legitimate.net/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBamluIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2f99b4422228de8a9aec2c8c6b6d47d09accf4ae/KyleCheney.jpg"
        },
        {
            "id": 2822,
            "slug": "gerard-donnelly-08f69bd9-5f84-48a8-b286-081b2a216367",
            "first_name": "Gerard",
            "last_name": "Donnelly",
            "job_title": "",
            "employer": "",
            "profile_image_url": "https://legitimate.net/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMUNNQ2c9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--29ce246b7d7b92f08d0b213ec1db6cf9e2f71b8f/dna.jpeg"
        }
    ],
    "domain_info": {
        "publication_name": "Politico",
        "domain": "politico.com",
        "description": "Politico offers current news, analysis, and coverage of politics, policy, and national affairs, focusing on the United States and international events.",
        "year_founded": 2007,
        "domain_age": null,
        "bodies_associations": null,
        "publisher": "Axel Springer",
        "publisher_description": "Axel Springer is Europe's largest newspaper publisher.",
        "country": "USA",
        "city": "Arlington",
        "state": "Virginia",
        "logo_path": null,
        "registration_data": {
            "registrant_name": "PERFECT PRIVACY, LLC",
            "registrant_country": "UNITED STATES",
            "registrar_company": "Register.com, Inc.",
            "domain_created": "1998-09-18",
            "domain_updated": "2021-11-11"
        }
    }
}
```

{% endtab %}

{% tab title="Domain Verified" %}
{% code fullWidth="false" %}

```json
{
    "verified": true,
    "type": "Domain Verified",
    "domain": "70and73.com",
    "domain_info": {
        "publication_name": "70and73.com",
        "domain": "70and73.com",
        "description": "A current events newspaper focused on recent happenings, trends, and insights, offering articles, analyses, and opinions on various topics to keep readers informed and engaged.",
        "year_founded": 2019,
        "domain_age": null,
        "bodies_associations": [
            {
                "accrnym": "LION",
                "name": "Local Independent Online Media",
                "description": "LION Publishers supports local independent online news organizations, offering resources like education, funding and sustainability audits to help news entrepreneurs build sustainable businesses.",
                "profile_image_url": "https://legitimate.net/images/bodies/lion.png"
            }
        ],
        "publisher": "Ewald Technology LLC",
        "publisher_description": "A New Jersey privately owned small business based in Marlton",
        "country": "USA",
        "city": "Marlton",
        "phone": null,
        "state": "NJ",
        "logo_path": "http://legitimate.net/images/publications/70and73.com.png",
        "registration_data": {
            "registrant_name": "REDACTED FOR PRIVACY",
            "registrant_country": "UNITED STATES",
            "registrar_company": "TUCOWS, INC.",
            "domain_created": "2017-08-27",
            "domain_updated": "2023-07-31"
        }
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="Unverified" %}

```json
{
    "verified": false,
    "type": "Unverified",
    "domain": "digitaliron.com",
    "message": "Publication not recognized.",
    "fact1": "None of the more than 13 thousand journalists on Legitimate have written for this website.",
    "fact2": "If you are unfamiliar with this publication, read it with caution and carry out additional research.",
    "article_title": "Boost Your Dealership's After-Sales Revenue",
    "registrant_name": "REDACTED FOR PRIVACY",
    "registrant_country": "UNITED KINGDOM",
    "registrar_name": "Squarespace Domains LLC",
    "domain_created": "2015-08-10T15:06:05Z",
    "domain_updated": "2024-04-12T13:00:39.401981Z"
}
```

{% endtab %}
{% endtabs %}

#### Article Verified Example

<figure><img src="https://330516961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHH-1LNVRGesTpz73RW%2Fuploads%2FqiMMNU2kuVFwN0FzDqyo%2FJournalist%20Verified.png?alt=media&#x26;token=7eed7877-ca71-4ac0-99ba-24e891dcfe3b" alt="Whats Possible with A Verified Response" width="300"><figcaption></figcaption></figure>

When an article is verified a design similar to the image above could be created to represent the article's author. Additional domain information will also be sent if you wanted to display that as well. <br>

### Domain Verified Plus

<figure><img src="https://330516961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHH-1LNVRGesTpz73RW%2Fuploads%2FdNrMsubEsR7GwsyFdb2Z%2FDomain%20Verified.png?alt=media&#x26;token=c7c83a85-0ebb-4dd9-b1cd-99d01a7261df" alt="" width="300"><figcaption></figcaption></figure>

This is an example of what is possible using the Domain Verified Plus response data.&#x20;

### Domain Verified

<figure><img src="https://330516961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHH-1LNVRGesTpz73RW%2Fuploads%2FW9ytwgjTW2WV2safbV62%2FDomain%20Verified%20Min.png?alt=media&#x26;token=be20ba8a-de90-4007-b597-c4d168166993" alt="" width="300"><figcaption></figcaption></figure>

An example of using the Domain Verified response. \
\
For the associations sub section. The API will supply the image, acronym, full name and description. In the example above we have shown the logos however you could add hover effects to show more information from the API. <br>

<figure><img src="https://330516961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHH-1LNVRGesTpz73RW%2Fuploads%2FQcozV8M6rsoe62EHJczB%2Finn.png?alt=media&#x26;token=f9b5b48e-3432-4991-95ed-477a4e906978" alt=""><figcaption></figcaption></figure>

See the sub section code below:

```json

"bodies_associations": [
            {
                "accrnym": "LION",
                "name": "Local Independent Online Media",
                "description": "Lion provides great stuff",
                "profile_image_url": "https://legitimate.net/images/bodies/lion.png"
            },
            {
                "accrnym": "INN",
                "name": "Institute For Non Profit News",
                "description": "INN provides great stuff",
                "profile_image_url": "https://legitimate.net/images/bodies/inn.png"
            }
        ],
```

### Unverified

<figure><img src="https://330516961-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MHH-1LNVRGesTpz73RW%2Fuploads%2FkNJ2IN8HeWtxO1E8CmA3%2Funverified-new.png?alt=media&#x26;token=d4ffbe92-0911-494a-ba3d-e3b0c5464667" alt=""><figcaption></figcaption></figure>

This is an example of what could be displayed using the unverified response.

### Examples in various languages

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

```
curl --location --request POST 'https://legitimate.net/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-doing-enough-to-combat-fake-news' \
--header 'Authorization: Bearer Ak8fkrk9jf98kjr889:9XdkfkK9H7yy7g76ggTX'
```

{% endtab %}

{% tab title="Javascript" %}

```
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer Ak8fkrk9jf98kjr889:9XdkfkK9H7yy7g76ggTX");

var formdata = new FormData();

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: formdata,
  redirect: 'follow'
};

fetch("https://legitimate.net/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-doing-enough-to-combat-fake-news", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="PHP" %}

```
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://legitimate.net/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-doing-enough-to-combat-fake-news',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer Ak8fkrk9jf98kjr889:9XdkfkK9H7yy7g76ggTX'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endtab %}

{% tab title="Python - http.client" %}

```
import http.client
import mimetypes
from codecs import encode

conn = http.client.HTTPSConnection("legitimate.net")
boundary = ''
payload = ''
headers = {
  'Authorization': 'Bearer Ak8fkrk9jf98kjr889:9XdkfkK9H7yy7g76ggTX',
  'Content-type': 'multipart/form-data; boundary={}'.format(boundary)
}
conn.request("POST", "/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-doing-enough-to-combat-fake-news", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="Ruby" %}

```
require "uri"
require "net/http"

url = URI("https://legitimate.net/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-doing-enough-to-combat-fake-news")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer Ak8fkrk9jf98kjr889:9XdkfkK9H7yy7g76ggTX"
form_data = []
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="Java - OKHttp" %}

```
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON, "{}");
Request request = new Request.Builder()
  .url("https://legitimate.net/api/verify_article?url=https://syncni.com/view/4879/are-tech-giants-doing-enough-to-combat-fake-news")
  .method("POST", body)
  .addHeader("Authorization", "Bearer Ak8fkrk9jf98kjr889:9XdkfkK9H7yy7g76ggTX")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}
{% endtabs %}
