sonicpoets.com

Implemented API calls

The Friendica API aims to be compatible to the GNU Social API and the Twitter API.

Please refer to the linked documentation for further information.

Implemented API calls

General

Unsupported parameters

Different behaviour

Return values

account/rate_limit_status

account/verify_credentials

Parameters

conversation/show

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

Parameters

Unsupported parameters

direct_messages

Parameters

Unsupported parameters

direct_messages/all

Parameters

direct_messages/conversation

Shows all direct messages of a conversation

Parameters

direct_messages/new

Parameters

direct_messages/sent

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.

favorites/create

Parameters

favorites/destroy

Parameters

followers/ids

Parameters

Unsupported parameters

Friendica doesn't allow showing followers of other users.

friendica/photo

Parameters

Returns data of a picture with the given resource.

friendica/photos/list

Returns a list of all photo resources of the logged in user.

friends/ids

Parameters

Unsupported parameters

Friendica doesn't allow showing friends of other users.

help/test

media/upload

Parameters

oauth/request_token

Parameters

Unsupported parameters

oauth/access_token

Parameters

Unsupported parameters

statuses/destroy

Parameters

Unsupported parameters

statuses/followers

statuses/friends

statuses/friends_timeline

Parameters

Unsupported parameters

statuses/home_timeline

Parameters

Unsupported parameters

statuses/mentions

Parameters

Unsupported parameters

statuses/public_timeline

Parameters

Unsupported parameters

statuses/replies

Parameters

Unsupported parameters

statuses/retweet

Parameters

Unsupported parameters

statuses/show

Parameters

Unsupported parameters

statuses/update, statuses/update_with_media

Parameters

Unsupported parameters

statuses/user_timeline

Parameters

Unsupported parameters

statusnet/config

statusnet/version

Unsupported parameters

Friendica doesn't allow showing followers of other users.

users/search

Parameters

Unsupported parameters

users/show

Parameters

Unsupported parameters

Friendica doesn't allow showing friends of other users.

Not Implemented API calls

The following API calls are implemented in GNU Social but not in Friendica: (incomplete)

The following API calls from the Twitter API aren't implemented neither in Friendica nor in GNU Social:

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.