API Version: V2 Last update: $Date: 2013-08-12 14:21:32 +0200 (lun. 12 août 2013) $ Copyright: Skyrock.com
Table of content
This documentation is about our REST-like HTTP API. It can output datas as JSON or as XML.
How to make a call ?
https://api.skyrock.com/v2/«NAMESPACE»/«METHOD».«FORMAT»/?arg1=parameter1
Where METHOD must be one of the methods described in this documentation and FORMAT must be either json or xml.
You can send parameters either as POST datas (using application/x-www-form-urlencoded) or GET datas.
Skyrock.com is using OAuth (RFC 5849) as its authentication mechanism. You can read more about it in our general purpose documentation.
Don't forget to check our general documentation before reading this document.
You can use our console to explore this API in your browser.
Returns the number of remaining queries. (See Request rate limits.) Calls to this method are not counted against the limits.
URL: https://api.skyrock.com/v2/check_rate_limit.json
HTTP Method(s): GET
Returns an user's public data.
If the call is authenticated and username is not provided, the method returns data about the current user's Skyrock account.
URL: https://api.skyrock.com/v2/user/get.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/user/get.json?username=lequipe-skyrock
If the call is authenticated, the following values are returned too:
- string allow_messages_from -- (nobody/everybody/friends)
- string lang
- string locale
Returns current user counters.
URL: https://api.skyrock.com/v2/user/get_counters.json
HTTP Method(s):
Authentication: yes
Parameters: none
List of users in blacklist.
URL: https://api.skyrock.com/v2/user/list_blacklist.json
HTTP Method(s): GET
Authentication: yes
Parameters: none
Adds a user to the blacklist.
URL: https://api.skyrock.com/v2/user/add_user_to_blacklist.json
HTTP Method(s): POST
Authentication: yes
Remove a user from the blacklist.
URL: https://api.skyrock.com/v2/user/remove_user_from_blacklist.json
HTTP Method(s): POST
Authentication: yes
Returns a blog public data.
If the call is authenticated and username is not provided, the method returns data about the current user's Skyrock blog.
URL: https://api.skyrock.com/v2/blog/get.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/blog/get.json?username=lequipe-skyrock
If the call is authenticated, the following values are returned too:
- int nb_offline_posts
- int nb_secret_posts
- bool post_moving_enabled
- bool social_share_enabled
- bool display_visits
- bool validate_comments
Sets authenticated user's blog data.
Each parameter is optional, you can either set one or many at once.
URL: https://api.skyrock.com/v2/blog/set.json
HTTP Method(s): POST
Authentication: yes
Changes authenticated user's blog avatar.
URL: https://api.skyrock.com/v2/blog/change_avatar.json
HTTP Method(s): POST
Authentication: yes
Returns an user's blog posts list (online only), paginated (10 articles per page)
URL: https://api.skyrock.com/v2/blog/list_posts.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/blog/list_posts.json?username=lequipe-skyrock&page=1
- float latitude
- float longitude
Returns current user's blog posts list (offline only), paginated
URL: https://api.skyrock.com/v2/blog/list_offline_posts.json
HTTP Method(s): GET
Authentication: yes
- Example: https://api.skyrock.com/v2/blog/list_offline_posts.json?page=1
- float latitude
- float longitude
Creates a new blog post.
URL: https://api.skyrock.com/v2/blog/new_post.json
HTTP Method(s): POST
Authentication: yes
Returns an user's blog post
Only online posts will be returned, unless authenticated user is its creator
URL: https://api.skyrock.com/v2/blog/get_post.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/blog/get_post.json?username=lequipe-skyrock&id_post=123456789
- float latitude
- float longitude
Edits a blog post
URL: https://api.skyrock.com/v2/blog/set_post.json
HTTP Method(s): POST
Authentication: yes
Deletes a blog post
URL: https://api.skyrock.com/v2/blog/delete_post.json
HTTP Method(s): POST
Authentication: yes
Returns a post's medias list.
URL: https://api.skyrock.com/v2/blog/list_post_medias.json
HTTP Method(s): GET
Authentication: optional
Associates media with a blog post.
URL: https://api.skyrock.com/v2/blog/new_post_media.json
HTTP Method(s): POST
Authentication: yes
Deletes a post's media.
URL: https://api.skyrock.com/v2/blog/delete_post_media.json
HTTP Method(s): POST
Authentication: yes
List a post's comments.
URL: https://api.skyrock.com/v2/blog/list_post_comments.json
HTTP Method(s): GET
Authentication: optional
- string post_url
- int id_post
- int id_comment
- timestamp date
- string content
- bool is_unread
- array author:
Returns a post's comment:
URL: https://api.skyrock.com/v2/blog/get_post_comment.json
HTTP Method(s): GET
Authentication: optional
Returns available skins.
URL: https://api.skyrock.com/v2/blog/list_skins.json
HTTP Method(s): GET
Authentication: no
- Example: https://api.skyrock.com/v2/blog/list_skins.json
- string category
- array list:
- int id_skin
- string name
Returns the list of pictures from all blog's articles, paginated (35 pictures per page).
URL: https://api.skyrock.com/v2/blog/list_pictures.json
HTTP Method(s): GET
Authentication: optional
Returns an user's profile public data.
URL: https://api.skyrock.com/v2/profile/get.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/profile/get.json?username=lequipe-skyrock
- int id_picture -- Picture identifier
- int id_album -- Album identifier
- string description -- Picture description
- string thumb_url -- Picture URL, thumbnail-sized
- string picture_url -- Picture URL
- int nb_comments -- Number of picture comments
- array geopoint
- float latitude
- float longitude
- string place -- City
- string type -- Geolocation setting -- Possible values : auto, manual
- string code
- int level
Set an user's profile public data.
URL: https://api.skyrock.com/v2/profile/set.json
HTTP Method(s): POST
Authentication: yes
Adds an album to the profile.
URL: https://api.skyrock.com/v2/profile/add_album.json
HTTP Method(s): POST
Authentication: yes
Returns the list of albums associated with a profile. Main album has id_album = 1
URL: https://api.skyrock.com/v2/profile/list_albums.json
HTTP Method(s): GET
Authentication: optional
Sets an album's title.
URL: https://api.skyrock.com/v2/profile/set_album.json
HTTP Method(s): POST
Authentication: yes
Deletes an empty album. Main album (id_album = 1) cannot be deleted.
URL: https://api.skyrock.com/v2/profile/delete_album.json
HTTP Method(s): POST
Authentication: yes
Adds a picture to the profile.
URL: https://api.skyrock.com/v2/profile/add_picture.json
HTTP Method(s): POST
Authentication: yes
Returns the list of pictures associated with a profile.
URL: https://api.skyrock.com/v2/profile/list_pictures.json
HTTP Method(s): GET
Authentication: optional
Returns a specified picture.
URL: https://api.skyrock.com/v2/profile/get_picture.json
HTTP Method(s): GET
Authentication: yes
Sets a picture's properties.
URL: https://api.skyrock.com/v2/profile/set_picture.json
HTTP Method(s): POST
Authentication: yes
Deletes a picture.
URL: https://api.skyrock.com/v2/profile/delete_picture.json
HTTP Method(s): POST
Authentication: yes
Returns settings about current user's profile.
URL: https://api.skyrock.com/v2/profile/get_config.json
HTTP Method(s): GET
Authentication: yes
Return:
- boolean show_visits_counter
- boolean show_comments_counter
- boolean show_my_websites
- boolean show_mood
- int display_policy
- boolean allow_share
- boolean allow_facebook_like
- boolean allow_votes
- int default_page
- boolean show_me_page
- boolean show_news_page
- boolean show_photos_page
- boolean show_videos_page
- boolean allow_comments
- boolean show_location
- boolean comment_policy
- int id_skin
Sets informations about a profile's.
(See get_property_values for possible values to set)
URL: https://api.skyrock.com/v2/profile/set_config.json
HTTP Method(s): POST
Authentication: yes
Parameters:
- boolean show_visits_counter
- boolean show_comments_counter
- boolean show_my_websites
- boolean show_mood
- int display_policy
- boolean allow_share
- boolean allow_facebook_like
- boolean allow_votes
- int default_page
- boolean show_me_page
- boolean show_news_page
- boolean show_photos_page
- boolean show_videos_page
- boolean allow_comments
- boolean show_location
- int id_skin
Returns possible values for a given property. These properties can be set using set or set_config
URL: https://api.skyrock.com/v2/profile/get_property_values.json
HTTP Method(s): GET
Authentication: yes
- gender
- gender_preference
- looks_for
- status
- town
- country
- department
- occupation
- place
- personality
- smoker
- hair_color
- eye_color
- height
- weight
- show_visits_counter
- show_comments_counter
- show_my_websites
- show_mood
- display_policy
- allow_share
- allow_facebook_like
- allow_votes
- default_page
- show_me_page
- show_news_page
- show_photos_page
- show_videos_page
- allow_comments
- show_location
- string property
- string title
- array values
Sets an user profile's tags. Tags are categorized by types, you can get a list of available types using the profile/get_tags_types method.
URL: https://api.skyrock.com/v2/profile/set_tags.json
HTTP Method(s): POST
Authentication: yes
- Example:
- POST https://api.skyrock.com/v2/profile/set_tags.xml
- POST Data music=Rap,Rock&people=Pimalewe
Returns an user profile's tags.
URL: https://api.skyrock.com/v2/profile/get_tags.json
HTTP Method(s): GET
Authentication: optional
Returns user profile's tags types.
URL: https://api.skyrock.com/v2/profile/get_tags_types.json
HTTP Method(s): GET
Authentication: no
Returns user profile's background image informations
URL: https://api.skyrock.com/v2/profile/get_background.json
HTTP Method(s): GET
Authentication: no
- string picture_url
- string thumb_url
- string position
Adds a background image to user's profile
URL: https://api.skyrock.com/v2/profile/add_background.json
HTTP Method(s): POST
Authentication: yes
Sets user profile's background image position
URL: https://api.skyrock.com/v2/profile/set_background_position.json
HTTP Method(s): POST
Authentication: yes
Delete user profile's background image
URL: https://api.skyrock.com/v2/profile/delete_background.json
HTTP Method(s): POST
Authentication: yes
Returns an user's mood list.
URL: https://api.skyrock.com/v2/mood/list_moods.json
HTTP Method(s): GET
Authentication: optional
Returns an user last mood.
URL: https://api.skyrock.com/v2/mood/get_mood.json
HTTP Method(s): GET
Authentication: optional
Sets an user's mood.
URL: https://api.skyrock.com/v2/mood/set_mood.json
HTTP Method(s): POST
Authentication: yes
Deletes an user's mood.
URL: https://api.skyrock.com/v2/mood/delete_mood.json
HTTP Method(s): POST
Authentication: yes
Sends a free text as event to the authenticated user's dash-board (eg. newsfeed). Events also appear in the dash-board of the user's friends. The message is not localized and should be send in the user language.
URL: https://api.skyrock.com/v2/newsfeed/send_event.json
HTTP Method(s): POST
Authentication: yes
You can write an URL in the event with <url> attribute:
message=completed a quest and won 900 XP and 5000 Gold. <url>View my characters</url> &url=http://ourapplication.com/link-for-the-event-or-user-profile
Sends a free text as alert to the authenticated user's alerts (notifications). The message is not localized and should be send in the user language.
Unlike events, alerts are personal.
URL: https://api.skyrock.com/v2/newsfeed/send_alert.json
HTTP Method(s): POST
Authentication: yes
You can write an URL in the alert with <url> attribute:
message=You have won <url>900 XP and 5000 Gold</url>. &url=http://ourapplication.com/link-for-the-notification
List events in the user's dash-board (eg. newsfeed).
URL: https://api.skyrock.com/v2/newsfeed/list_events.json
HTTP Method(s): GET
Authentication: yes
Returns descriptions of events types, for developer information.
URL: https://api.skyrock.com/v2/newsfeed/list_events_types.json
HTTP Method(s): GET
Authentication: no
List user's alerts (notifications).
URL: https://api.skyrock.com/v2/newsfeed/list_alerts.json
HTTP Method(s): GET
Authentication: yes
Returns descriptions of alerts types, for developer information.
URL: https://api.skyrock.com/v2/newsfeed/list_alerts_types.json
HTTP Method(s): GET
Authentication: no
Returns the authenticated user's message threads (15 threads per page).
URL: https://api.skyrock.com/v2/message/list_threads.json
HTTP Method(s): GET
Authentication: yes
Returns a message thread (15 messages per page).
URL: https://api.skyrock.com/v2/message/get_thread.json
HTTP Method(s): GET
Authentication: yes
Marks a message thread as read.
URL: https://api.skyrock.com/v2/message/set_thread_as_read.json
HTTP Method(s): POST
Authentication: yes
Deletes a message thread.
URL: https://api.skyrock.com/v2/message/delete_thread.json
HTTP Method(s): POST
Authentication: yes
Deletes a message.
URL: https://api.skyrock.com/v2/message/delete_message.json
HTTP Method(s): POST
Authentication: yes
Sends a message to a single recipient.
URL: https://api.skyrock.com/v2/message/send_message.json
HTTP Method(s): POST
Authentication: yes
Creates a multi-recipient thread.
URL: https://api.skyrock.com/v2/message/create_thread.json
HTTP Method(s): POST
Authentication: yes
Replies to a thread.
URL: https://api.skyrock.com/v2/message/reply_thread.json
HTTP Method(s): POST
Authentication: yes
Search users by username.
URL: https://api.skyrock.com/v2/search/users.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/search/users.json?q=lepima
- int id_user
- bool is_online
- string avatar_url
- string user_url
- string username
- int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
Search public blog posts.
URL: https://api.skyrock.com/v2/search/posts.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/search/posts.json?q=citrouille&contains=picture
- int id_user
- int id_post
- string url
- string title
- string excerpt
- timestamp updated_at
Search public profiles.
URL: https://api.skyrock.com/v2/search/profiles.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/search/profiles.json?gender=girls&age=18,25&online=1&with_photo=1&looking_for=boys
- int id_user
- bool is_online
- string avatar_url
- string user_url
- string username
- int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
Returns an user's relations, paginated (50 relations per page).
URL: https://api.skyrock.com/v2/relationship/list_relations.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/relationship/list_relations.json?username=lequipe-skyrock&kind=friend
- int id_user
- bool is_online
- bool is_new -- Indicates a recently added (unseen) relation
- bool is_follower -- Indicates whether the user follows you
- bool is_following -- Indicates whether you follow the user
- string avatar_url
- string user_url
- string username
- int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
Returns an user's relations ids, paginated (50 relations per page).
URL: https://api.skyrock.com/v2/relationship/list_relations_ids.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/relationship/list_relations_ids.json?username=lequipe-skyrock&kind=friend
- int id_user
Returns an user's online relations.
URL: https://api.skyrock.com/v2/relationship/list_online_relations.json
HTTP Method(s): GET
Authentication: optional
- Example: https://api.skyrock.com/v2/relationship/list_online_relations.json?username=lequipe-skyrock&kind=friend
- int id_user
- bool is_online
- bool is_follower -- Indicates whether the user follows you
- bool is_following -- Indicates whether you follow the user
- string avatar_url
- string user_url
- string username
- int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
Check whether user 1 is following user 2.
URL: https://api.skyrock.com/v2/relationship/is_following.json
HTTP Method(s): GET
Authentication: yes
- Example: https://api.skyrock.com/v2/relationship/is_following.json?id_user_1=33265738&id_user_2=7569711
Check whether user 1 is followed by user 2.
URL: https://api.skyrock.com/v2/relationship/is_followed_by.json
HTTP Method(s): GET
Authentication: yes
- Example: https://api.skyrock.com/v2/relationship/is_followed_by.json?id_user_1=33265738&id_user_2=7569711
Check friend relation between two users.
URL: https://api.skyrock.com/v2/relationship/is_friend.json
HTTP Method(s): GET
Authentication: yes
- Example: https://api.skyrock.com/v2/relationship/is_friend.json?id_user_1=33265738&id_user_2=7569711
Search within your relations using criteria, paginated (50 relations per page).
URL: https://api.skyrock.com/v2/relationship/search.json
HTTP Method(s): GET
Authentication: yes
- Example: https://api.skyrock.com/v2/relationship/search.json?pseudo=lequipe&kind=friend
- int id_user
- bool is_online
- bool is_follower -- Indicates whether the user follows you
- bool is_following -- Indicates whether you follow the user
- string avatar_url
- string user_url
- string username
- int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
Follows an user.
URL: https://api.skyrock.com/v2/relationship/follow.json
HTTP Method(s): POST
Authentication: yes
- bool success
- bool is_friend -- Defines user added as friend
Unfollows an user.
URL: https://api.skyrock.com/v2/relationship/unfollow.json
HTTP Method(s): POST
Authentication: yes
Set relations last seen timestamp.
URL: https://api.skyrock.com/v2/relationship/set_seen.json
HTTP Method(s): POST
Authentication: yes
The number of requests per application is limited within time periods.
When the maximum number of requests is reached, an HTTP 403 status code is returned. (see Error messages)
- X-Rate-Limit-IP: the remaining number of requests for the current IP address (for non-OAuthenticated requests)
- X-Rate-Limit-User: the remaining number of requests for the current user and application (for OAuthenticated requests)
- X-Rate-Limit-Reset: the date and time when limits are reset
The API always replies to a request with the HTTP status code and a formatted error message.
Features:
Profile: added new methods related to background image get_background add_background set_background_position delete_background
Features:
New namespace Relationship: * list_relations * list_relations_ids * is_following * is_followed_by * is_friend * search * follow * unfollow * set_seen
Changes:
User: no more friends, these methods are deprecated (please use relationship instead): * list_online_friends * send_friend_request * remove_from_friends * accept_friend_request * list_friend_requests * deny_friend_request * list_friends * list_friends_ids * is_friend Blog: removed nb_favorites from get, new skyrock_compressor method
Changes:
User: removed pending_invitations_vip from get_counters User and Blog : removed best friends interactions
Changes:
Removed media_align parameter from Blog / set_post method
Changes:
Removed methods and properties related to groups: - User: list_groups - Blog: set (display_groups property) - Blog: get (display_groups property) - Profile: get_config (block_groups property) - Profile: set_config (block_groups property) - Profile: get_property_values (block_groups property)
Features:
User: add pending_invitations_vip in get_counters
Features:
Profile: add location: geopoint, place and type in get
Features:
Profile: add show_location property in get_config, set_config and get_property_values User: add profile_visits and unseen_profile_visits in get_counters
Features:
New namespace Search: posts, profiles and users methods added
Features:
Blog: add geopoint (latitude and longitude coordinates) in get_post, list_posts and list_offline_posts method
Changes:
User: remove get_emails_hashes Gift: remove deprecated gift methods Blog: add skyrock_encode and remove blog/replace_post_media Examples added for profil/set_tags
Fixes:
Minor bug fixes
Features:
User: new method is_friend
Features:
Profile: add available_slots in list_albums method
Fixes:
Use clearer HTTP status code (400) for errors (file upload or maximum reached) in: Blog: new_post, new_post_media Profile: add_picture, add_album Newsfeed: send_event, send_alert
Changes:
User: remove deprecated method send_best_friend_request (please use send_friend_request)
Fixes:
User: accept_friend_request does not add to best_friend list by default
Features:
User: new method list_friends_ids Profile: album and photo methods New namespaces: Newsfeed and Mood
Changes:
User: id is now id_user, url is now user_url Output format can be html or bbcode
Fixes:
Many bug fixes
First release of new OAuth API V2.