SQL Server / Twitter API v2 / Users by Username
Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
DECLARE @queryParams int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @queryParams OUT
EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'usernames', ''
-- Adds the "Authorization: Bearer <access_token>" header.
EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api.twitter.com/2/users/by', @queryParams
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
RETURN
END
DECLARE @sbResponseBody int
-- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT
EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody
DECLARE @jResp int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT
EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
EXEC sp_OASetProperty @jResp, 'EmitCompact', 0
PRINT 'Response Body:'
EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
PRINT @sTmp0
DECLARE @respStatusCode int
EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT
PRINT 'Response Status Code = ' + @respStatusCode
IF @respStatusCode >= 400
BEGIN
PRINT 'Response Header:'
EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
PRINT @sTmp0
PRINT 'Failed.'
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
RETURN
END
EXEC @hr = sp_OADestroy @resp
-- Sample JSON response:
-- (Sample code for parsing the JSON response is shown below)
-- {
-- "data": [
-- {
-- "created_at": "2007-02-20T14:35:54.000Z",
-- "description": "Black queer lives matter.\nBlack trans lives matter.\n#BlackLivesMatter",
-- "entities": {
-- "url": {
-- "urls": [
-- {
-- "start": 0,
-- "end": 23,
-- "url": "https://t.co/TAXQpspyHn",
-- "expanded_url": "https://about.twitter.com/",
-- "display_url": "about.twitter.com"
-- }
-- ]
-- },
-- "description": {
-- "hashtags": [
-- {
-- "start": 52,
-- "end": 69,
-- "tag": "BlackLivesMatter"
-- }
-- ]
-- }
-- },
-- "id": "783214",
-- "location": "Everywhere",
-- "name": "Twitter",
-- "pinned_tweet_id": "1274087687469715457",
-- "profile_image_url": "https://pbs.twimg.com/profile_images/1270500941498912768/W-80pLvu_normal.jpg",
-- "protected": false,
-- "url": "https://t.co/TAXQpspyHn",
-- "username": "Twitter",
-- "verified": true
-- },
-- {
-- "created_at": "2013-12-14T04:35:55.000Z",
-- "description": "The voice of Twitter's #DevRel team, and your official source for updates, news, & events about Twitter's API. \n\n#BlackLivesMatter",
-- "entities": {
-- "url": {
-- "urls": [
-- {
-- "start": 0,
-- "end": 23,
-- "url": "https://t.co/3ZX3TNiZCY",
-- "expanded_url": "https://developer.twitter.com/en/community",
-- "display_url": "developer.twitter.com/en/community"
-- }
-- ]
-- },
-- "description": {
-- "hashtags": [
-- {
-- "start": 23,
-- "end": 30,
-- "tag": "DevRel"
-- },
-- {
-- "start": 113,
-- "end": 130,
-- "tag": "BlackLivesMatter"
-- }
-- ]
-- }
-- },
-- "id": "2244994945",
-- "location": "127.0.0.1",
-- "name": "Twitter Dev",
-- "pinned_tweet_id": "1255542774432063488",
-- "profile_image_url": "https://pbs.twimg.com/profile_images/1267175364003901441/tBZNFAgA_normal.jpg",
-- "protected": false,
-- "url": "https://t.co/3ZX3TNiZCY",
-- "username": "TwitterDev",
-- "verified": true
-- },
-- {
-- "created_at": "2007-05-23T06:01:13.000Z",
-- "description": "The Real Twitter API. Tweets about API changes, service issues and our Developer Platform. Don't get an answer? It's on my website.",
-- "entities": {
-- "url": {
-- "urls": [
-- {
-- "start": 0,
-- "end": 23,
-- "url": "https://t.co/8IkCzCDr19",
-- "expanded_url": "https://developer.twitter.com",
-- "display_url": "developer.twitter.com"
-- }
-- ]
-- }
-- },
-- "id": "6253282",
-- "location": "San Francisco, CA",
-- "name": "Twitter API",
-- "profile_image_url": "https://pbs.twimg.com/profile_images/942858479592554497/BbazLO9L_normal.jpg",
-- "protected": false,
-- "url": "https://t.co/8IkCzCDr19",
-- "username": "TwitterAPI",
-- "verified": true
-- },
-- {
-- "created_at": "2012-02-17T20:40:28.000Z",
-- "description": "#BlackLivesMatter",
-- "entities": {
-- "url": {
-- "urls": [
-- {
-- "start": 0,
-- "end": 23,
-- "url": "https://t.co/UFN8PpMrxw",
-- "expanded_url": "https://careers.twitter.com/content/careers-twitter/en/jobs.html#location=careers-twitter%3Alocation",
-- "display_url": "careers.twitter.com/content/career…"
-- }
-- ]
-- },
-- "description": {
-- "hashtags": [
-- {
-- "start": 0,
-- "end": 17,
-- "tag": "BlackLivesMatter"
-- }
-- ]
-- }
-- },
-- "id": "495309159",
-- "location": "New York, NY",
-- "name": "Twitter New York City",
-- "profile_image_url": "https://pbs.twimg.com/profile_images/1016781101011034115/p0Ie-_Dr_normal.jpg",
-- "protected": false,
-- "url": "https://t.co/UFN8PpMrxw",
-- "username": "TwitterNYC",
-- "verified": true
-- },
-- {
-- "created_at": "2010-07-28T18:40:01.000Z",
-- "description": "#BlackLivesMatter",
-- "entities": {
-- "url": {
-- "urls": [
-- {
-- "start": 0,
-- "end": 23,
-- "url": "https://t.co/MQRffLoRTw",
-- "expanded_url": "https://careers.twitter.com/",
-- "display_url": "careers.twitter.com"
-- }
-- ]
-- },
-- "description": {
-- "hashtags": [
-- {
-- "start": 0,
-- "end": 17,
-- "tag": "BlackLivesMatter"
-- }
-- ]
-- }
-- },
-- "id": "172020392",
-- "location": "San Francisco, CA",
-- "name": "Twitter San Francisco",
-- "profile_image_url": "https://pbs.twimg.com/profile_images/875159529008226305/7jXeHhZC_normal.jpg",
-- "protected": false,
-- "url": "https://t.co/MQRffLoRTw",
-- "username": "TwitterSF",
-- "verified": true
-- }
-- ],
-- "includes": {
-- "tweets": [
-- {
-- "attachments": {
-- "media_keys": [
-- "3_1274086027544498176"
-- ]
-- },
-- "author_id": "783214",
-- "conversation_id": "1274087687469715457",
-- "created_at": "2020-06-19T21:12:30.000Z",
-- "entities": {
-- "mentions": [
-- {
-- "start": 17,
-- "end": 29,
-- "username": "FredTJoseph"
-- }
-- ],
-- "urls": [
-- {
-- "start": 30,
-- "end": 53,
-- "url": "https://t.co/lNTOkyguG1",
-- "expanded_url": "https://twitter.com/Twitter/status/1274087687469715457/photo/1",
-- "display_url": "pic.twitter.com/lNTOkyguG1"
-- }
-- ]
-- },
-- "id": "1274087687469715457",
-- "lang": "et",
-- "possibly_sensitive": false,
-- "source": "Twitter Web App",
-- "text": "📍 Minneapolis\n🗣️ @FredTJoseph https://t.co/lNTOkyguG1"
-- },
-- {
-- "author_id": "2244994945",
-- "conversation_id": "1255542774432063488",
-- "created_at": "2020-04-29T17:01:38.000Z",
-- "entities": {
-- "urls": [
-- {
-- "start": 264,
-- "end": 287,
-- "url": "https://t.co/BPqMcQzhId",
-- "expanded_url": "https://blog.twitter.com/developer/en_us/topics/tools/2020/covid19_public_conversation_data.html",
-- "display_url": "blog.twitter.com/developer/en_u…",
-- "images": [
-- {
-- "url": "https://pbs.twimg.com/news_img/1274730688919613440/SEsqlE16?format=jpg&name=orig",
-- "width": 1600,
-- "height": 600
-- },
-- {
-- "url": "https://pbs.twimg.com/news_img/1274730688919613440/SEsqlE16?format=jpg&name=150x150",
-- "width": 150,
-- "height": 150
-- }
-- ],
-- "status": 200,
-- "title": "Enabling study of the public conversation in a time of crisis",
-- "description": "To further support our company’s ongoing efforts, we want to enable developers and researchers to study the public conversation on COVID-19 in real-time.",
-- "unwound_url": "https://blog.twitter.com/developer/en_us/topics/tools/2020/covid19_public_conversation_data.html"
-- }
-- ]
-- },
-- "id": "1255542774432063488",
-- "lang": "en",
-- "possibly_sensitive": false,
-- "source": "Twitter Web App",
-- "text": "During these unprecedented times, what’s happening on Twitter can help the world better understand & respond to the pandemic. \n\nWe're launching a free COVID-19 stream endpoint so qualified devs & researchers can study the public conversation in real-time. https://t.co/BPqMcQzhId"
-- }
-- ]
-- }
-- }
-- Sample code for parsing the JSON response...
-- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
DECLARE @created_at nvarchar(4000)
DECLARE @description nvarchar(4000)
DECLARE @id nvarchar(4000)
DECLARE @location nvarchar(4000)
DECLARE @name nvarchar(4000)
DECLARE @pinned_tweet_id nvarchar(4000)
DECLARE @profile_image_url nvarchar(4000)
DECLARE @v_protected int
DECLARE @url nvarchar(4000)
DECLARE @username nvarchar(4000)
DECLARE @verified int
DECLARE @j int
DECLARE @count_j int
DECLARE @start int
DECLARE @v_end int
DECLARE @expanded_url nvarchar(4000)
DECLARE @display_url nvarchar(4000)
DECLARE @tag nvarchar(4000)
DECLARE @author_id nvarchar(4000)
DECLARE @conversation_id nvarchar(4000)
DECLARE @lang nvarchar(4000)
DECLARE @possibly_sensitive int
DECLARE @source nvarchar(4000)
DECLARE @text nvarchar(4000)
DECLARE @strVal nvarchar(4000)
DECLARE @status int
DECLARE @title nvarchar(4000)
DECLARE @unwound_url nvarchar(4000)
DECLARE @k int
DECLARE @count_k int
DECLARE @width int
DECLARE @height int
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'data'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @created_at OUT, 'data[i].created_at'
EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'data[i].description'
EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'data[i].id'
EXEC sp_OAMethod @jResp, 'StringOf', @location OUT, 'data[i].location'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'data[i].name'
EXEC sp_OAMethod @jResp, 'StringOf', @pinned_tweet_id OUT, 'data[i].pinned_tweet_id'
EXEC sp_OAMethod @jResp, 'StringOf', @profile_image_url OUT, 'data[i].profile_image_url'
EXEC sp_OAMethod @jResp, 'BoolOf', @v_protected OUT, 'data[i].protected'
EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'data[i].url'
EXEC sp_OAMethod @jResp, 'StringOf', @username OUT, 'data[i].username'
EXEC sp_OAMethod @jResp, 'BoolOf', @verified OUT, 'data[i].verified'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].entities.url.urls'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @start OUT, 'data[i].entities.url.urls[j].start'
EXEC sp_OAMethod @jResp, 'IntOf', @v_end OUT, 'data[i].entities.url.urls[j].end'
EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'data[i].entities.url.urls[j].url'
EXEC sp_OAMethod @jResp, 'StringOf', @expanded_url OUT, 'data[i].entities.url.urls[j].expanded_url'
EXEC sp_OAMethod @jResp, 'StringOf', @display_url OUT, 'data[i].entities.url.urls[j].display_url'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'data[i].entities.description.hashtags'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @start OUT, 'data[i].entities.description.hashtags[j].start'
EXEC sp_OAMethod @jResp, 'IntOf', @v_end OUT, 'data[i].entities.description.hashtags[j].end'
EXEC sp_OAMethod @jResp, 'StringOf', @tag OUT, 'data[i].entities.description.hashtags[j].tag'
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
SELECT @i = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'includes.tweets'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @author_id OUT, 'includes.tweets[i].author_id'
EXEC sp_OAMethod @jResp, 'StringOf', @conversation_id OUT, 'includes.tweets[i].conversation_id'
EXEC sp_OAMethod @jResp, 'StringOf', @created_at OUT, 'includes.tweets[i].created_at'
EXEC sp_OAMethod @jResp, 'StringOf', @id OUT, 'includes.tweets[i].id'
EXEC sp_OAMethod @jResp, 'StringOf', @lang OUT, 'includes.tweets[i].lang'
EXEC sp_OAMethod @jResp, 'BoolOf', @possibly_sensitive OUT, 'includes.tweets[i].possibly_sensitive'
EXEC sp_OAMethod @jResp, 'StringOf', @source OUT, 'includes.tweets[i].source'
EXEC sp_OAMethod @jResp, 'StringOf', @text OUT, 'includes.tweets[i].text'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'includes.tweets[i].attachments.media_keys'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'includes.tweets[i].attachments.media_keys[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'includes.tweets[i].entities.mentions'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @start OUT, 'includes.tweets[i].entities.mentions[j].start'
EXEC sp_OAMethod @jResp, 'IntOf', @v_end OUT, 'includes.tweets[i].entities.mentions[j].end'
EXEC sp_OAMethod @jResp, 'StringOf', @username OUT, 'includes.tweets[i].entities.mentions[j].username'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'includes.tweets[i].entities.urls'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @start OUT, 'includes.tweets[i].entities.urls[j].start'
EXEC sp_OAMethod @jResp, 'IntOf', @v_end OUT, 'includes.tweets[i].entities.urls[j].end'
EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'includes.tweets[i].entities.urls[j].url'
EXEC sp_OAMethod @jResp, 'StringOf', @expanded_url OUT, 'includes.tweets[i].entities.urls[j].expanded_url'
EXEC sp_OAMethod @jResp, 'StringOf', @display_url OUT, 'includes.tweets[i].entities.urls[j].display_url'
EXEC sp_OAMethod @jResp, 'IntOf', @status OUT, 'includes.tweets[i].entities.urls[j].status'
EXEC sp_OAMethod @jResp, 'StringOf', @title OUT, 'includes.tweets[i].entities.urls[j].title'
EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'includes.tweets[i].entities.urls[j].description'
EXEC sp_OAMethod @jResp, 'StringOf', @unwound_url OUT, 'includes.tweets[i].entities.urls[j].unwound_url'
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'includes.tweets[i].entities.urls[j].images'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @url OUT, 'includes.tweets[i].entities.urls[j].images[k].url'
EXEC sp_OAMethod @jResp, 'IntOf', @width OUT, 'includes.tweets[i].entities.urls[j].images[k].width'
EXEC sp_OAMethod @jResp, 'IntOf', @height OUT, 'includes.tweets[i].entities.urls[j].images[k].height'
SELECT @k = @k + 1
END
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @queryParams
EXEC @hr = sp_OADestroy @sbResponseBody
EXEC @hr = sp_OADestroy @jResp
END
GO
Curl Command
curl -G -d "usernames="
-H "Authorization: Bearer <access_token>"
https://api.twitter.com/2/users/by
Postman Collection Item JSON
{
"name": "Users by Username",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "",
"description": "Required. Enter up to 100 comma-separated usernames."
},
{
"key": "user.fields",
"value": "",
"description": "Comma-separated fields for the user object.\n\nAllowed values:\ncreated_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld\n\nDefault values:\nid,name,username",
"disabled": true
},
{
"key": "expansions",
"value": "",
"description": "Expansions enable requests to expand an ID into a full object in the includes response object.\n\nAllowed value:\npinned_tweet_id\n\nDefault value: none",
"disabled": true
},
{
"key": "tweet.fields",
"value": "",
"description": "Comma-separated list of fields for the Tweet object. Expansion required.\n\nAllowed values:\nattachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld\n\nDefault values:\nid,text\n\nOAuth1.0a User Context authorization required if any of the following fields are included in the request:\nnon_public_metrics,organic_metrics,promoted_metrics",
"disabled": true
}
]
},
"description": "This endpoint returns details about up to 100 users specified by username.\n\nFor full details, see the [API reference](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by) for this endpoint.\n\n[Sign up](https://t.co/signup) for the Twitter API"
},
"response": [
{
"name": "200 Success - Request Fields for Users and Expanded Pinned Tweet",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=twitter,twitterdev,twitterapi,twitternyc,twittersf&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld&expansions=pinned_tweet_id&tweet.fields=attachments,author_id,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source,text,withheld",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "twitter,twitterdev,twitterapi,twitternyc,twittersf",
"description": "Required."
},
{
"key": "user.fields",
"value": "created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld",
"description": "created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld"
},
{
"key": "expansions",
"value": "pinned_tweet_id",
"description": "pinned_tweet_id"
},
{
"key": "tweet.fields",
"value": "attachments,author_id,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source,text,withheld",
"description": "attachments,author_id,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,referenced_tweets,source,text,withheld"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "content-disposition",
"value": "attachment; filename=json.json"
},
{
"key": "content-encoding",
"value": "gzip"
},
{
"key": "content-length",
"value": "1748"
},
{
"key": "content-type",
"value": "application/json; charset=utf-8"
},
{
"key": "date",
"value": "Fri, 26 Jun 2020 16:32:49 GMT"
},
{
"key": "server",
"value": "tsa_b"
},
{
"key": "strict-transport-security",
"value": "max-age=631138519"
},
{
"key": "x-access-level",
"value": "read"
},
{
"key": "x-connection-hash",
"value": "eae8bea11e85fe49e732de33763f0cf2"
},
{
"key": "x-content-type-options",
"value": "nosniff"
},
{
"key": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"key": "x-rate-limit-limit",
"value": "15"
},
{
"key": "x-rate-limit-remaining",
"value": "1"
},
{
"key": "x-rate-limit-reset",
"value": "1593189419"
},
{
"key": "x-response-time",
"value": "110"
},
{
"key": "x-xss-protection",
"value": "0"
}
],
"cookie": [
],
"body": "{\n \"data\": [\n {\n \"created_at\": \"2007-02-20T14:35:54.000Z\",\n \"description\": \"Black queer lives matter.\\nBlack trans lives matter.\\n#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/TAXQpspyHn\",\n \"expanded_url\": \"https://about.twitter.com/\",\n \"display_url\": \"about.twitter.com\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 52,\n \"end\": 69,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"783214\",\n \"location\": \"Everywhere\",\n \"name\": \"Twitter\",\n \"pinned_tweet_id\": \"1274087687469715457\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/1270500941498912768/W-80pLvu_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/TAXQpspyHn\",\n \"username\": \"Twitter\",\n \"verified\": true\n },\n {\n \"created_at\": \"2013-12-14T04:35:55.000Z\",\n \"description\": \"The voice of Twitter's #DevRel team, and your official source for updates, news, & events about Twitter's API. \\n\\n#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/3ZX3TNiZCY\",\n \"expanded_url\": \"https://developer.twitter.com/en/community\",\n \"display_url\": \"developer.twitter.com/en/community\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 23,\n \"end\": 30,\n \"tag\": \"DevRel\"\n },\n {\n \"start\": 113,\n \"end\": 130,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"2244994945\",\n \"location\": \"127.0.0.1\",\n \"name\": \"Twitter Dev\",\n \"pinned_tweet_id\": \"1255542774432063488\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/1267175364003901441/tBZNFAgA_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/3ZX3TNiZCY\",\n \"username\": \"TwitterDev\",\n \"verified\": true\n },\n {\n \"created_at\": \"2007-05-23T06:01:13.000Z\",\n \"description\": \"The Real Twitter API. Tweets about API changes, service issues and our Developer Platform. Don't get an answer? It's on my website.\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/8IkCzCDr19\",\n \"expanded_url\": \"https://developer.twitter.com\",\n \"display_url\": \"developer.twitter.com\"\n }\n ]\n }\n },\n \"id\": \"6253282\",\n \"location\": \"San Francisco, CA\",\n \"name\": \"Twitter API\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/942858479592554497/BbazLO9L_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/8IkCzCDr19\",\n \"username\": \"TwitterAPI\",\n \"verified\": true\n },\n {\n \"created_at\": \"2012-02-17T20:40:28.000Z\",\n \"description\": \"#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/UFN8PpMrxw\",\n \"expanded_url\": \"https://careers.twitter.com/content/careers-twitter/en/jobs.html#location=careers-twitter%3Alocation\",\n \"display_url\": \"careers.twitter.com/content/career…\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 0,\n \"end\": 17,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"495309159\",\n \"location\": \"New York, NY\",\n \"name\": \"Twitter New York City\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/1016781101011034115/p0Ie-_Dr_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/UFN8PpMrxw\",\n \"username\": \"TwitterNYC\",\n \"verified\": true\n },\n {\n \"created_at\": \"2010-07-28T18:40:01.000Z\",\n \"description\": \"#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/MQRffLoRTw\",\n \"expanded_url\": \"https://careers.twitter.com/\",\n \"display_url\": \"careers.twitter.com\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 0,\n \"end\": 17,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"172020392\",\n \"location\": \"San Francisco, CA\",\n \"name\": \"Twitter San Francisco\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/875159529008226305/7jXeHhZC_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/MQRffLoRTw\",\n \"username\": \"TwitterSF\",\n \"verified\": true\n }\n ],\n \"includes\": {\n \"tweets\": [\n {\n \"attachments\": {\n \"media_keys\": [\n \"3_1274086027544498176\"\n ]\n },\n \"author_id\": \"783214\",\n \"conversation_id\": \"1274087687469715457\",\n \"created_at\": \"2020-06-19T21:12:30.000Z\",\n \"entities\": {\n \"mentions\": [\n {\n \"start\": 17,\n \"end\": 29,\n \"username\": \"FredTJoseph\"\n }\n ],\n \"urls\": [\n {\n \"start\": 30,\n \"end\": 53,\n \"url\": \"https://t.co/lNTOkyguG1\",\n \"expanded_url\": \"https://twitter.com/Twitter/status/1274087687469715457/photo/1\",\n \"display_url\": \"pic.twitter.com/lNTOkyguG1\"\n }\n ]\n },\n \"id\": \"1274087687469715457\",\n \"lang\": \"et\",\n \"possibly_sensitive\": false,\n \"source\": \"Twitter Web App\",\n \"text\": \"📍 Minneapolis\\n🗣️ @FredTJoseph https://t.co/lNTOkyguG1\"\n },\n {\n \"author_id\": \"2244994945\",\n \"conversation_id\": \"1255542774432063488\",\n \"created_at\": \"2020-04-29T17:01:38.000Z\",\n \"entities\": {\n \"urls\": [\n {\n \"start\": 264,\n \"end\": 287,\n \"url\": \"https://t.co/BPqMcQzhId\",\n \"expanded_url\": \"https://blog.twitter.com/developer/en_us/topics/tools/2020/covid19_public_conversation_data.html\",\n \"display_url\": \"blog.twitter.com/developer/en_u…\",\n \"images\": [\n {\n \"url\": \"https://pbs.twimg.com/news_img/1274730688919613440/SEsqlE16?format=jpg&name=orig\",\n \"width\": 1600,\n \"height\": 600\n },\n {\n \"url\": \"https://pbs.twimg.com/news_img/1274730688919613440/SEsqlE16?format=jpg&name=150x150\",\n \"width\": 150,\n \"height\": 150\n }\n ],\n \"status\": 200,\n \"title\": \"Enabling study of the public conversation in a time of crisis\",\n \"description\": \"To further support our company’s ongoing efforts, we want to enable developers and researchers to study the public conversation on COVID-19 in real-time.\",\n \"unwound_url\": \"https://blog.twitter.com/developer/en_us/topics/tools/2020/covid19_public_conversation_data.html\"\n }\n ]\n },\n \"id\": \"1255542774432063488\",\n \"lang\": \"en\",\n \"possibly_sensitive\": false,\n \"source\": \"Twitter Web App\",\n \"text\": \"During these unprecedented times, what’s happening on Twitter can help the world better understand & respond to the pandemic. \\n\\nWe're launching a free COVID-19 stream endpoint so qualified devs & researchers can study the public conversation in real-time. https://t.co/BPqMcQzhId\"\n }\n ]\n }\n}"
},
{
"name": "429 Rate Limit Exceeded",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=jack,twitterdev",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "jack,twitterdev"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "plain",
"header": [
{
"key": "content-encoding",
"value": "gzip"
},
{
"key": "content-length",
"value": "46"
},
{
"key": "content-type",
"value": "text/plain;charset=utf-8"
},
{
"key": "date",
"value": "Wed, 24 Jun 2020 17:16:16 GMT"
},
{
"key": "server",
"value": "tsa_b"
},
{
"key": "strict-transport-security",
"value": "max-age=631138519"
},
{
"key": "x-connection-hash",
"value": "86a90a7aa13fde1840d52be0d1faf5c4"
},
{
"key": "x-rate-limit-limit",
"value": "15"
},
{
"key": "x-rate-limit-remaining",
"value": "0"
},
{
"key": "x-rate-limit-reset",
"value": "1593019345"
},
{
"key": "x-response-time",
"value": "7"
}
],
"cookie": [
],
"body": "Rate limit exceeded\n"
},
{
"name": "200 Success - Default Payload",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "content-disposition",
"value": "attachment; filename=json.json"
},
{
"key": "content-encoding",
"value": "gzip"
},
{
"key": "content-length",
"value": "1222"
},
{
"key": "content-type",
"value": "application/json; charset=utf-8"
},
{
"key": "date",
"value": "Tue, 30 Jun 2020 16:41:09 GMT"
},
{
"key": "server",
"value": "tsa_b"
},
{
"key": "strict-transport-security",
"value": "max-age=631138519"
},
{
"key": "x-access-level",
"value": "read"
},
{
"key": "x-connection-hash",
"value": "7a7652a95e302d19d13b9444dd88cb49"
},
{
"key": "x-content-type-options",
"value": "nosniff"
},
{
"key": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"key": "x-rate-limit-limit",
"value": "15"
},
{
"key": "x-rate-limit-remaining",
"value": "12"
},
{
"key": "x-rate-limit-reset",
"value": "1593535752"
},
{
"key": "x-response-time",
"value": "168"
},
{
"key": "x-xss-protection",
"value": "0"
}
],
"cookie": [
],
"body": "{\n \"data\": [\n {\n \"id\": \"783214\",\n \"name\": \"Twitter\",\n \"username\": \"Twitter\"\n },\n {\n \"id\": \"2244994945\",\n \"name\": \"Twitter Dev\",\n \"username\": \"TwitterDev\"\n },\n {\n \"id\": \"6253282\",\n \"name\": \"Twitter API\",\n \"username\": \"TwitterAPI\"\n },\n {\n \"id\": \"495309159\",\n \"name\": \"Twitter New York City\",\n \"username\": \"TwitterNYC\"\n },\n {\n \"id\": \"172020392\",\n \"name\": \"Twitter San Francisco\",\n \"username\": \"TwitterSF\"\n },\n {\n \"id\": \"95731075\",\n \"name\": \"Twitter Safety\",\n \"username\": \"TwitterSafety\"\n },\n {\n \"id\": \"2548985366\",\n \"name\": \"Twitter Blackbirds\",\n \"username\": \"Blackbirds\"\n },\n {\n \"id\": \"277761722\",\n \"name\": \"Twitter UK\",\n \"username\": \"TwitterUK\"\n },\n {\n \"id\": \"17874544\",\n \"name\": \"Twitter Support\",\n \"username\": \"TwitterSupport\"\n },\n {\n \"id\": \"300392950\",\n \"name\": \"Twitter Sports\",\n \"username\": \"TwitterSports\"\n },\n {\n \"id\": \"87532773\",\n \"name\": \"Twitter Design\",\n \"username\": \"TwitterDesign\"\n },\n {\n \"id\": \"372575989\",\n \"name\": \"Twitter News\",\n \"username\": \"TwitterNews\"\n },\n {\n \"id\": \"3260518932\",\n \"name\": \"Twitter Moments\",\n \"username\": \"TwitterMoments\"\n },\n {\n \"id\": \"121291606\",\n \"name\": \"Twitter Business\",\n \"username\": \"TwitterBusiness\"\n },\n {\n \"id\": \"158079127\",\n \"name\": \"Twitter Nonprofits\",\n \"username\": \"Nonprofits\"\n },\n {\n \"id\": \"3282859598\",\n \"name\": \"Twitter Video\",\n \"username\": \"TwitterVideo\"\n },\n {\n \"id\": \"103770785\",\n \"name\": \"Twitter India\",\n \"username\": \"TwitterIndia\"\n },\n {\n \"id\": \"586198217\",\n \"name\": \"Twitter TV\",\n \"username\": \"TwitterTV\"\n },\n {\n \"id\": \"216531294\",\n \"name\": \"Twitter Korea\",\n \"username\": \"TwitterKorea\"\n },\n {\n \"id\": \"1526228120\",\n \"name\": \"Twitter Data\",\n \"username\": \"TwitterData\"\n },\n {\n \"id\": \"222953824\",\n \"name\": \"TwitterGov\",\n \"username\": \"TwitterGov\"\n },\n {\n \"id\": \"1603818258\",\n \"name\": \"Twitter Investor Relations\",\n \"username\": \"TwitterIR\"\n },\n {\n \"id\": \"2548979088\",\n \"name\": \"Twitter Alas\",\n \"username\": \"TwitterAlas\"\n },\n {\n \"id\": \"2244983430\",\n \"name\": \"Twitter Singapore\",\n \"username\": \"TwitterSG\"\n },\n {\n \"id\": \"1347713256\",\n \"name\": \"Twitter Canada\",\n \"username\": \"TwitterCanada\"\n },\n {\n \"id\": \"376825877\",\n \"name\": \"Twitter Open Source\",\n \"username\": \"TwitterOSS\"\n },\n {\n \"id\": \"6844292\",\n \"name\": \"Twitter Engineering\",\n \"username\": \"TwitterEng\"\n },\n {\n \"id\": \"738118115595165697\",\n \"name\": \"Twitter Stripes\",\n \"username\": \"TwitterStripes\"\n },\n {\n \"id\": \"738118487122419712\",\n \"name\": \"Twitter Asians\",\n \"username\": \"TwitterAsians\"\n },\n {\n \"id\": \"218984871\",\n \"name\": \"Twitter Public Policy\",\n \"username\": \"Policy\"\n },\n {\n \"id\": \"2550997820\",\n \"name\": \"Twitter Indonesia\",\n \"username\": \"TwitterID\"\n },\n {\n \"id\": \"1159458169\",\n \"name\": \"Twitter 政治\",\n \"username\": \"TwitterGovJP\"\n },\n {\n \"id\": \"2296297326\",\n \"name\": \"Twitter Moments UK & Ireland\",\n \"username\": \"UKMoments\"\n },\n {\n \"id\": \"234489024\",\n \"name\": \"Twitter Comms\",\n \"username\": \"TwitterComms\"\n },\n {\n \"id\": \"3873936134\",\n \"name\": \"Twitter Gaming @ home\",\n \"username\": \"TwitterGaming\"\n },\n {\n \"id\": \"2228891959\",\n \"name\": \"Twitter MENA\",\n \"username\": \"TwitterMENA\"\n },\n {\n \"id\": \"791978718\",\n \"name\": \"Twitter Official Partner\",\n \"username\": \"OfficialPartner\"\n },\n {\n \"id\": \"427475002\",\n \"name\": \"Twitter Books\",\n \"username\": \"TwitterBooks\"\n },\n {\n \"id\": \"1194267639100723200\",\n \"name\": \"Twitter Retweets\",\n \"username\": \"TwitterRetweets\"\n },\n {\n \"id\": \"1168976680867762177\",\n \"name\": \"Twitter Able\",\n \"username\": \"TwitterAble\"\n },\n {\n \"id\": \"905409822\",\n \"name\": \"Twitter SRE\",\n \"username\": \"TwitterSRE\"\n },\n {\n \"id\": \"738115375477362688\",\n \"name\": \"Twitter Moments India\",\n \"username\": \"MomentsIndia\"\n },\n {\n \"id\": \"88723966\",\n \"name\": \"Twitter Seguro\",\n \"username\": \"TwitterSeguro\"\n },\n {\n \"id\": \"1049385226424786944\",\n \"name\": \"Twitter Miami\",\n \"username\": \"TwitterMiami\"\n },\n {\n \"id\": \"284201599\",\n \"name\": \"Twitter Terns\",\n \"username\": \"terns\"\n },\n {\n \"id\": \"1705676064\",\n \"name\": \"Twitter公式採用アカウント\",\n \"username\": \"JoinTheFlockJP\"\n },\n {\n \"id\": \"2861317614\",\n \"name\": \"Twitter ファッション\",\n \"username\": \"TwitterFashnJP\"\n },\n {\n \"id\": \"3873965293\",\n \"name\": \"Twitter Moments en Español\",\n \"username\": \"MomentsES\"\n },\n {\n \"id\": \"1244731491088809984\",\n \"name\": \"Twitter Thailand\",\n \"username\": \"TwitterThailand\"\n },\n {\n \"id\": \"4172587277\",\n \"name\": \"Twitter Moments Brasil\",\n \"username\": \"MomentsBrasil\"\n },\n {\n \"id\": \"717465714357972992\",\n \"name\": \"Twitter Video India\",\n \"username\": \"TwitterVideoIN\"\n },\n {\n \"id\": \"862314223\",\n \"name\": \"Twitter ミュージック\",\n \"username\": \"TwitterMusicJP\"\n },\n {\n \"id\": \"2551000568\",\n \"name\": \"Twitter Mktg Latam\",\n \"username\": \"TwitterMktLatam\"\n },\n {\n \"id\": \"2548977510\",\n \"name\": \"Twitter Careers Brasil\",\n \"username\": \"JoinTheFlockBR\"\n },\n {\n \"id\": \"1159274324\",\n \"name\": \"Twitter スポーツ\",\n \"username\": \"TwitterSportsJP\"\n }\n ]\n}"
},
{
"name": "200 Success - Request User Fields",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=twitter,twitterdev,twitterapi,twitternyc,twittersf&user.fields=created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "twitter,twitterdev,twitterapi,twitternyc,twittersf",
"description": "Required."
},
{
"key": "user.fields",
"value": "created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld",
"description": "created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,url,username,verified,withheld"
},
{
"key": "expansions",
"value": "",
"description": "pinned_tweet_id",
"disabled": true
},
{
"key": "tweet.fields",
"value": "",
"description": "attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,source,text,withheld",
"disabled": true
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "content-disposition",
"value": "attachment; filename=json.json"
},
{
"key": "content-encoding",
"value": "gzip"
},
{
"key": "content-length",
"value": "1027"
},
{
"key": "content-type",
"value": "application/json; charset=utf-8"
},
{
"key": "date",
"value": "Fri, 26 Jun 2020 16:39:42 GMT"
},
{
"key": "server",
"value": "tsa_b"
},
{
"key": "strict-transport-security",
"value": "max-age=631138519"
},
{
"key": "x-access-level",
"value": "read"
},
{
"key": "x-connection-hash",
"value": "eae8bea11e85fe49e732de33763f0cf2"
},
{
"key": "x-content-type-options",
"value": "nosniff"
},
{
"key": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"key": "x-rate-limit-limit",
"value": "15"
},
{
"key": "x-rate-limit-remaining",
"value": "13"
},
{
"key": "x-rate-limit-reset",
"value": "1593190457"
},
{
"key": "x-response-time",
"value": "72"
},
{
"key": "x-xss-protection",
"value": "0"
}
],
"cookie": [
],
"body": "{\n \"data\": [\n {\n \"created_at\": \"2007-02-20T14:35:54.000Z\",\n \"description\": \"Black queer lives matter.\\nBlack trans lives matter.\\n#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/TAXQpspyHn\",\n \"expanded_url\": \"https://about.twitter.com/\",\n \"display_url\": \"about.twitter.com\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 52,\n \"end\": 69,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"783214\",\n \"location\": \"Everywhere\",\n \"name\": \"Twitter\",\n \"pinned_tweet_id\": \"1274087687469715457\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/1270500941498912768/W-80pLvu_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/TAXQpspyHn\",\n \"username\": \"Twitter\",\n \"verified\": true\n },\n {\n \"created_at\": \"2013-12-14T04:35:55.000Z\",\n \"description\": \"The voice of Twitter's #DevRel team, and your official source for updates, news, & events about Twitter's API. \\n\\n#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/3ZX3TNiZCY\",\n \"expanded_url\": \"https://developer.twitter.com/en/community\",\n \"display_url\": \"developer.twitter.com/en/community\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 23,\n \"end\": 30,\n \"tag\": \"DevRel\"\n },\n {\n \"start\": 113,\n \"end\": 130,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"2244994945\",\n \"location\": \"127.0.0.1\",\n \"name\": \"Twitter Dev\",\n \"pinned_tweet_id\": \"1255542774432063488\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/1267175364003901441/tBZNFAgA_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/3ZX3TNiZCY\",\n \"username\": \"TwitterDev\",\n \"verified\": true\n },\n {\n \"created_at\": \"2007-05-23T06:01:13.000Z\",\n \"description\": \"The Real Twitter API. Tweets about API changes, service issues and our Developer Platform. Don't get an answer? It's on my website.\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/8IkCzCDr19\",\n \"expanded_url\": \"https://developer.twitter.com\",\n \"display_url\": \"developer.twitter.com\"\n }\n ]\n }\n },\n \"id\": \"6253282\",\n \"location\": \"San Francisco, CA\",\n \"name\": \"Twitter API\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/942858479592554497/BbazLO9L_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/8IkCzCDr19\",\n \"username\": \"TwitterAPI\",\n \"verified\": true\n },\n {\n \"created_at\": \"2012-02-17T20:40:28.000Z\",\n \"description\": \"#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/UFN8PpMrxw\",\n \"expanded_url\": \"https://careers.twitter.com/content/careers-twitter/en/jobs.html#location=careers-twitter%3Alocation\",\n \"display_url\": \"careers.twitter.com/content/career…\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 0,\n \"end\": 17,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"495309159\",\n \"location\": \"New York, NY\",\n \"name\": \"Twitter New York City\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/1016781101011034115/p0Ie-_Dr_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/UFN8PpMrxw\",\n \"username\": \"TwitterNYC\",\n \"verified\": true\n },\n {\n \"created_at\": \"2010-07-28T18:40:01.000Z\",\n \"description\": \"#BlackLivesMatter\",\n \"entities\": {\n \"url\": {\n \"urls\": [\n {\n \"start\": 0,\n \"end\": 23,\n \"url\": \"https://t.co/MQRffLoRTw\",\n \"expanded_url\": \"https://careers.twitter.com/\",\n \"display_url\": \"careers.twitter.com\"\n }\n ]\n },\n \"description\": {\n \"hashtags\": [\n {\n \"start\": 0,\n \"end\": 17,\n \"tag\": \"BlackLivesMatter\"\n }\n ]\n }\n },\n \"id\": \"172020392\",\n \"location\": \"San Francisco, CA\",\n \"name\": \"Twitter San Francisco\",\n \"profile_image_url\": \"https://pbs.twimg.com/profile_images/875159529008226305/7jXeHhZC_normal.jpg\",\n \"protected\": false,\n \"url\": \"https://t.co/MQRffLoRTw\",\n \"username\": \"TwitterSF\",\n \"verified\": true\n }\n ]\n}"
},
{
"name": "400 Bad Request - Too Many Users",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp,twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp,twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp",
"description": "Required. Enter up to 100 comma-separated usernames."
},
{
"key": "user.fields",
"value": null,
"description": "created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld",
"disabled": true
},
{
"key": "expansions",
"value": null,
"description": "pinned_tweet_id",
"disabled": true
},
{
"key": "tweet.fields",
"value": null,
"description": "attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,source,text,withheld",
"disabled": true
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "content-disposition",
"value": "attachment; filename=json.json"
},
{
"key": "content-encoding",
"value": "gzip"
},
{
"key": "content-length",
"value": "457"
},
{
"key": "content-type",
"value": "application/json; charset=utf-8"
},
{
"key": "date",
"value": "Tue, 30 Jun 2020 17:22:45 GMT"
},
{
"key": "server",
"value": "tsa_b"
},
{
"key": "strict-transport-security",
"value": "max-age=631138519"
},
{
"key": "x-access-level",
"value": "read"
},
{
"key": "x-connection-hash",
"value": "857207159289071cdd445778e071a674"
},
{
"key": "x-content-type-options",
"value": "nosniff"
},
{
"key": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"key": "x-rate-limit-limit",
"value": "15"
},
{
"key": "x-rate-limit-remaining",
"value": "1"
},
{
"key": "x-rate-limit-reset",
"value": "1593538196"
},
{
"key": "x-response-time",
"value": "20"
},
{
"key": "x-xss-protection",
"value": "0"
}
],
"cookie": [
],
"body": "{\n \"errors\": [\n {\n \"parameters\": {\n \"usernames\": [\n \"twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp,twitter,twitterdev,twitterapi,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign,twitternews,twittermoments,twitterbusiness,nonprofits,twittervideo,twitterindia,twittertv,twitterkorea,twitterdata,twittergov,twitterir,twitteralas,twittersg,twittercanada,twitteross,twittereng,twitterstripes,twitterasians,policy,twitterid,twittergovjp,ukmoments,twittercomms,twittergaming,twittermena,officialpartner,twitterbooks,twitterretweets,twitterable,twittersre,momentsindia,twitterseguro,twittermiami,terns,jointheflockjp,twitterfashnjp,momentses,twitterthailand,momentsbrasil,twittervideoin,twittermusicjp,twittermktlatam,jointheflockbr,twittersportsjp\"\n ]\n },\n \"message\": \"size [110] is not between 1 and 100\"\n }\n ],\n \"title\": \"Invalid Request\",\n \"detail\": \"One or more parameters to your request was invalid.\",\n \"type\": \"https://api.twitter.com/2/problems/invalid-request\"\n}"
},
{
"name": "200 Success - Some Users Not Found",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "https://api.twitter.com/2/users/by?usernames=twitterrrrrrr,twitterdevvvvvv,twitterapiiiii,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign",
"protocol": "https",
"host": [
"api",
"twitter",
"com"
],
"path": [
"2",
"users",
"by"
],
"query": [
{
"key": "usernames",
"value": "twitterrrrrrr,twitterdevvvvvv,twitterapiiiii,twitternyc,twittersf,twittersafety,blackbirds,twitteruk,twittersupport,twittersports,twitterdesign",
"description": "Required. Enter up to 100 comma-separated usernames."
},
{
"key": "user.fields",
"value": null,
"description": "created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld",
"disabled": true
},
{
"key": "expansions",
"value": null,
"description": "pinned_tweet_id",
"disabled": true
},
{
"key": "tweet.fields",
"value": null,
"description": "attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,source,text,withheld",
"disabled": true
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "content-disposition",
"value": "attachment; filename=json.json"
},
{
"key": "content-encoding",
"value": "gzip"
},
{
"key": "content-length",
"value": "396"
},
{
"key": "content-type",
"value": "application/json; charset=utf-8"
},
{
"key": "date",
"value": "Tue, 30 Jun 2020 17:21:52 GMT"
},
{
"key": "server",
"value": "tsa_b"
},
{
"key": "strict-transport-security",
"value": "max-age=631138519"
},
{
"key": "x-access-level",
"value": "read"
},
{
"key": "x-connection-hash",
"value": "857207159289071cdd445778e071a674"
},
{
"key": "x-content-type-options",
"value": "nosniff"
},
{
"key": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"key": "x-rate-limit-limit",
"value": "15"
},
{
"key": "x-rate-limit-remaining",
"value": "2"
},
{
"key": "x-rate-limit-reset",
"value": "1593538196"
},
{
"key": "x-response-time",
"value": "99"
},
{
"key": "x-xss-protection",
"value": "0"
}
],
"cookie": [
],
"body": "{\n \"data\": [\n {\n \"id\": \"495309159\",\n \"name\": \"Twitter New York City\",\n \"username\": \"TwitterNYC\"\n },\n {\n \"id\": \"172020392\",\n \"name\": \"Twitter San Francisco\",\n \"username\": \"TwitterSF\"\n },\n {\n \"id\": \"95731075\",\n \"name\": \"Twitter Safety\",\n \"username\": \"TwitterSafety\"\n },\n {\n \"id\": \"2548985366\",\n \"name\": \"Twitter Blackbirds\",\n \"username\": \"Blackbirds\"\n },\n {\n \"id\": \"277761722\",\n \"name\": \"Twitter UK\",\n \"username\": \"TwitterUK\"\n },\n {\n \"id\": \"17874544\",\n \"name\": \"Twitter Support\",\n \"username\": \"TwitterSupport\"\n },\n {\n \"id\": \"300392950\",\n \"name\": \"Twitter Sports\",\n \"username\": \"TwitterSports\"\n },\n {\n \"id\": \"87532773\",\n \"name\": \"Twitter Design\",\n \"username\": \"TwitterDesign\"\n }\n ],\n \"errors\": [\n {\n \"detail\": \"Could not find user with usernames: [twitterrrrrrr].\",\n \"title\": \"Not Found Error\",\n \"resource_type\": \"user\",\n \"parameter\": \"usernames\",\n \"value\": \"twitterrrrrrr\",\n \"type\": \"https://api.twitter.com/2/problems/resource-not-found\"\n },\n {\n \"detail\": \"Could not find user with usernames: [twitterdevvvvvv].\",\n \"title\": \"Not Found Error\",\n \"resource_type\": \"user\",\n \"parameter\": \"usernames\",\n \"value\": \"twitterdevvvvvv\",\n \"type\": \"https://api.twitter.com/2/problems/resource-not-found\"\n },\n {\n \"detail\": \"Could not find user with usernames: [twitterapiiiii].\",\n \"title\": \"Not Found Error\",\n \"resource_type\": \"user\",\n \"parameter\": \"usernames\",\n \"value\": \"twitterapiiiii\",\n \"type\": \"https://api.twitter.com/2/problems/resource-not-found\"\n }\n ]\n}"
}
]
}