---
description: Single or multiple username
---

# by Usernames

<mark style="color:blue;">`GET`</mark> `https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name`

curl --location --request GET 'http://localhost:5001/appgregator/us-central1/twitter/users/user-by-name?name=qantor.co.id\&connection\_name=twitter-1\&username=docial'\
\--header 'x-api-key: 43c464439b5507293ba7b315c9875907'

#### Query Parameters

| Name                                               | Type   | Description    |
| -------------------------------------------------- | ------ | -------------- |
| name<mark style="color:red;">\*</mark>             | String | qantor.co.id   |
| connection\_name<mark style="color:red;">\*</mark> | String | twitter-1      |
| usernames<mark style="color:red;">\*</mark>        | String | docial,pranksy |

#### Headers

| Name                                        | Type   | Description                      |
| ------------------------------------------- | ------ | -------------------------------- |
| x-api-key<mark style="color:red;">\*</mark> | String | 43c464439b5507293ba7b315c9875907 |

{% tabs %}
{% tab title="200: OK Success" %}
```javascript
{
    "data": [
        {
            "id": "145251358",
            "name": "Docial Porter",
            "username": "docial"
        },
        {
            "id": "2621412174",
            "name": "Pranksy 📦",
            "username": "pranksy"
        }
    ]
}
```
{% endtab %}

{% tab title="200: OK User not found" %}
```javascript
{
    "errors": [
        {
            "detail": "Could not find user with username: [TwitterDec].",
            "title": "Not Found Error",
            "resource_type": "user",
            "parameter": "username",
            "value": "TwitterDec",
            "type": "https://api.twitter.com/2/problems/resource-not-found"
        }
    ]
}
```
{% endtab %}

{% tab title="429: Too Many Requests Rate Limit Exceeded" %}
```javascript
Rate limit exceeded
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}
```shell
curl --location --request GET 'https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&usernames=docial,pranksy' \
--header 'x-api-key: 43c464439b5507293ba7b315c9875907'
```
{% endtab %}

{% tab title="NodeJs + Axios" %}
```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&usernames=docial,pranksy',
  headers: { 
    'x-api-key': '43c464439b5507293ba7b315c9875907'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```
{% endtab %}

{% tab title="PHP + cURL" %}
```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/twitter/users/user-by-name?name=qantor.co.id&connection_name=twitter-1&usernames=docial,pranksy',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'x-api-key: 43c464439b5507293ba7b315c9875907'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```
{% endtab %}
{% endtabs %}
