The friendica API aims to be compatible to the StatusNet API which aims to be compatible to the Twitter API 1.0.

Please refer to the linked documentation for further information.

Implemented API calls

General

Unsupported parameters

Different behaviour

Return values

account/verify_credentials

Parameters

statuses/update, statuses/update_with_media

Parameters

Unsupported parameters

users/search

Parameters

Unsupported parameters

users/show

Parameters

statuses/home_timeline

Parameters

Unsupported parameters

statuses/friends_timeline

Parameters

Unsupported parameters

statuses/public_timeline

Parameters

Unsupported parameters

statuses/show

Parameters

Unsupported parameters

statuses/retweet

Parameters

Unsupported parameters

statuses/destroy

Parameters

Unsupported parameters

statuses/mentions

Parameters

Unsupported parameters

statuses/replies

Parameters

Unsupported parameters

statuses/user_timeline

Parameters

Unsupported parameters

conversation/show

Unofficial Twitter command. It shows all direct answers (excluding the original post) to a given id.

Parameters

Unsupported parameters

favorites

Parameters

Unsupported parameters

Favorites aren't displayed to other users, so "user_id" and "screen_name". So setting this value will result in an empty array.

account/rate_limit_status

help/test

statuses/friends

Unsupported parameters

Friendica doesn't allow showing friends of other users.

statuses/followers

Unsupported parameters

Friendica doesn't allow showing followers of other users.

statusnet/config

statusnet/version

friends/ids

Parameters

Unsupported parameters

Friendica doesn't allow showing friends of other users.

followers/ids

Parameters

Unsupported parameters

Friendica doesn't allow showing followers of other users.

direct_messages/new

Parameters

direct_messages/conversation

Shows all direct messages of a conversation

Parameters

direct_messages/all

Parameters

direct_messages/sent

Parameters

direct_messages

Parameters

Unsupported parameters

oauth/request_token

Parameters

Unsupported parameters

oauth/access_token

Parameters

Unsupported parameters

Not Implemented API calls

The following list is extracted from the API source file (at the very bottom): * favorites/create * favorites/destroy * statuses/retweets_of_me * friendships/create * friendships/destroy * friendships/exists * friendships/show * account/update_location * account/update_profile_background_image * account/update_profile_image * blocks/create * blocks/destroy

The following are things from the Twitter API also not implemented in StatusNet: * statuses/retweeted_to_me * statuses/retweeted_by_me * direct_messages/destroy * account/end_session * account/update_delivery_device * notifications/follow * notifications/leave * blocks/exists * blocks/blocking * lists

Usage Examples

BASH / cURL

Betamax has documentated some example API usage from a [bash script](https://en.wikipedia.org/wiki/Bash_(Unix_shell) employing curl (see his posting).

/usr/bin/curl -u USER:PASS https://YOUR.FRIENDICA.TLD/api/statuses/update.xml -d source="some source id" -d status="the status you want to post"

Python

The RSStoFriedika code can be used as an example of how to use the API with python. The lines for posting are located at line 21 and following.

def tweet(server, message, group_allow=None):
    url = server + '/api/statuses/update'
    urllib2.urlopen(url, urllib.urlencode({'status': message,'group_allow[]':group_allow}, doseq=True))

There is also a module for python 3 for using the API.