This snapshot, taken on
27/09/2010
, shows web content acquired for preservation by The National Archives. External links, forms and search may not work in archived websites and contact details are likely to be out of date.
 
 
The UK Government Web Archive does not use cookies but some may be left in your browser from archived websites.

Basic Auth has been deprecated.

Attention! August 31, 2010 Basic Auth has been deprecated. All applications must now use OAuth. Read more »   x

Don't fret! @twitterapi is here to help! Feel free to reach out to us directly, or via our Twitter Development Talk group.

The switch to OAuth is a good thing! You, as the application developer,

  • don't have the burden of keeping potentially damaging credentials for your users (especially considering that a lot of people use the same password for multiple services);
  • don't have to worry about the user changing their password — a user can change his or her password and the OAuth "connection" to your app will still work;
  • don't have to worry about other applications masquerading as your application as only your application can set the byline with your application name;
  • will eventually have access to more trusted APIs from Twitter that will only be available to "trusted" OAuth-enabled applications; and
  • will be contributing to the web of trust between users, service providers, and applications.

Choose your authorization path.

POST report_spam

The user specified in the id is blocked by the authenticated user and reported as a spammer.

URL

http://api.twitter.com/version/report_spam.format

Supported formats

json, xml

Supported request methods

POST

Requires Authentication

true About authentication »

Rate Limited

false About rate limiting »

Parameters

Optional

  • user_id The ID of the user you want to report as a spammer. Helpful for disambiguating when a valid user ID is also a valid screen name.
    • http://api.twitter.com/1/report_spam.json?user_id=12345
  • screen_name The ID or screen_name of the user you want to report as a spammer. Helpful for disambiguating when a valid screen name is also a user ID.
    • http://api.twitter.com/1/report_spam.json?screen_name=noradio
  • include_entities When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. While entities are opt-in on timelines at present, they will be made a default component of output in the future. See Tweet Entities for more detail on entities.
    • http://api.twitter.com/1/report_spam.json?include_entities=true

Example requests

JSON

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
  "name": "Matt Harris",
  "profile_sidebar_border_color": "C0DEED",
  "profile_background_tile": false,
  "profile_sidebar_fill_color": "DDEEF6",
  "location": "San Francisco",
  "profile_image_url": "http://a1.twimg.com/profile_images/554181350/matt_normal.jpg",
  "created_at": "Sat Feb 17 20:49:54 +0000 2007",
  "profile_link_color": "0084B4",
  "favourites_count": 95,
  "url": "http://themattharris.com",
  "contributors_enabled": false,
  "utc_offset": -28800,
  "id": 777925,
  "profile_use_background_image": true,
  "profile_text_color": "333333",
  "protected": false,
  "followers_count": 1025,
  "lang": "en",
  "verified": false,
  "profile_background_color": "C0DEED",
  "geo_enabled": true,
  "notifications": false,
  "description": "Developer Advocate at Twitter. Also a hacker and British expat who is married to @cindyli and lives in San Francisco.",
  "time_zone": "Tijuana",
  "friends_count": 294,
  "statuses_count": 2924,
  "profile_background_image_url": "http://s.twimg.com/a/1276711174/images/themes/theme1/bg.png",
  "status": {
    "coordinates": {
      "coordinates": [
        -122.40075845,
        37.78264991
      ],
      "type": "Point"
    },
    "favorited": false,
    "created_at": "Tue Jun 22 18:17:48 +0000 2010",
    "truncated": false,
    "text": "Going through and updating @twitterapi documentation",
    "contributors": null,
    "id": 16789004997,
    "geo": {
      "coordinates": [
        37.78264991,
        -122.40075845
      ],
      "type": "Point"
    },
    "in_reply_to_user_id": null,
    "place": null,
    "source": "<a href=http://webarchive.nationalarchives.gov.uk/20100505213210/http://dev.twitter.com/doc/post/"http://itunes.apple.com/app/twitter/id333903271?mt=8" rel="nofollow">Twitter for iPhone</a>",
    "in_reply_to_screen_name": null,
    "in_reply_to_status_id": null
  },
  "screen_name": "themattharris",
  "following": false
}

XML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <id>777925</id>
  <name>Matt Harris</name>
  <screen_name>themattharris</screen_name>
  <location>San Francisco</location>
  <description>Developer Advocate at Twitter. Also a hacker and British expat who is married to @cindyli and lives in San Francisco.</description>
  <profile_image_url>http://a1.twimg.com/profile_images/554181350/matt_normal.jpg</profile_image_url>
  <url>http://themattharris.com</url>
  <protected>false</protected>
  <followers_count>1025</followers_count>
  <profile_background_color>C0DEED</profile_background_color>
  <profile_text_color>333333</profile_text_color>
  <profile_link_color>0084B4</profile_link_color>
  <profile_sidebar_fill_color>DDEEF6</profile_sidebar_fill_color>
  <profile_sidebar_border_color>C0DEED</profile_sidebar_border_color>
  <friends_count>294</friends_count>
  <created_at>Sat Feb 17 20:49:54 +0000 2007</created_at>
  <favourites_count>95</favourites_count>
  <utc_offset>-28800</utc_offset>
  <time_zone>Tijuana</time_zone>
  <profile_background_image_url>http://s.twimg.com/a/1276711174/images/themes/theme1/bg.png</profile_background_image_url>
  <profile_background_tile>false</profile_background_tile>
  <profile_use_background_image>true</profile_use_background_image>
  <notifications></notifications>
  <geo_enabled>true</geo_enabled>
  <verified>false</verified>
  <following></following>
  <statuses_count>2924</statuses_count>
  <lang>en</lang>
  <contributors_enabled>false</contributors_enabled>
  <status>
    <created_at>Tue Jun 22 18:17:48 +0000 2010</created_at>
    <id>16789004997</id>
    <text>Going through and updating @twitterapi documentation</text>
    <source>&lt;a href=http://webarchive.nationalarchives.gov.uk/20100505213210/http://dev.twitter.com/doc/post/&quot;http://itunes.apple.com/app/twitter/id333903271?mt=8&quot; rel=&quot;nofollow&quot;&gt;Twitter for iPhone&lt;/a&gt;</source>
    <truncated>false</truncated>
    <in_reply_to_status_id></in_reply_to_status_id>
    <in_reply_to_user_id></in_reply_to_user_id>
    <favorited>false</favorited>
    <in_reply_to_screen_name></in_reply_to_screen_name>
    <geo xmlns:georss="http://www.georss.org/georss">
      <georss:point>37.78264991 -122.40075845</georss:point>
    </geo>
    <coordinates xmlns:georss="http://www.georss.org/georss">
      <georss:point>37.78264991 -122.40075845</georss:point>
    </coordinates>
    <place/>
    <contributors/>
  </status>
</user>

Extended Discussion

The URL pattern /version/report_spam.format?id=:screen_name_or_user_id is still accepted but not recommended. As a sequence of numbers is a valid screen name we recommend using the screen_name or user_id parameter instead.

This document last updated by themattharris on June 20, 2010