Skyrock.com API

API Version:V2
Last update:$Date: 2013-08-12 14:21:32 +0200 (lun. 12 août 2013) $
Copyright:Skyrock.com

Technical documentation

General introduction

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.

Authentication

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.

Console

You can use our console to explore this API in your browser.

Technical documentation

General methods

check_rate_limit

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

Return:
  • int ip -- Current IP based limit value
  • int user -- Current user based limit value (if authenticated)
  • date reset -- Date when limits are reset.

User Methods

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

Parameters:
  • int id_user (optional if OAuthenticated) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • Example: https://api.skyrock.com/v2/user/get.json?username=lequipe-skyrock
Return:
  • int id_user
  • bool is_online
  • string avatar_url
  • string avatar_big_url (Large format)
  • string user_url -- default user url (blog or profile url)
  • string username
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
  • int nb_friends
  • bool has_blog
  • bool has_profile

If the call is authenticated, the following values are returned too:

  • string allow_messages_from -- (nobody/everybody/friends)
  • string lang
  • string locale
If the requested user is the logged one, the following values are returned too:
  • string firstname
  • string name
  • string birth_date
  • string email
  • string address1
  • string address2
  • string postalcode
  • string city
  • string country
get_counters

Returns current user counters.

URL: https://api.skyrock.com/v2/user/get_counters.json

HTTP Method(s):

Authentication: yes

Parameters: none

Return:
  • array
    • int unread_messages
    • int unread_blog_comments
    • int pending_invitations
    • int blog_visits
    • int unseen_blog_visits
    • int newsfeed_unseen_notifications
    • int profile_visits
    • int unseen_profile_visits
    • int followed_by
    • int followings
    • int friends
    • int unseen_followed_by
    • int unseen_followings
    • int unseen_friends
    • int unseen_relationship
list_blacklist

List of users in blacklist.

URL: https://api.skyrock.com/v2/user/list_blacklist.json

HTTP Method(s): GET

Authentication: yes

Parameters: none

Return:
  • array users:
    • int id_user
    • string username
    • string avatar_url
    • string user_url
    • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
    • bool is_online
add_user_to_blacklist

Adds a user to the blacklist.

URL: https://api.skyrock.com/v2/user/add_user_to_blacklist.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_user -- user id
  • string username (optional) -- username
Return:
  • bool Success
remove_user_from_blacklist

Remove a user from the blacklist.

URL: https://api.skyrock.com/v2/user/remove_user_from_blacklist.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_user -- user id
  • string username (optional) -- username
Return:
  • bool Success

Blog Methods

get

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

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • string output_format (optional) -- Defines which format to output, for specific rich text fields. Possible values : 'html' (default), 'bbcode'
  • Example: https://api.skyrock.com/v2/blog/get.json?username=lequipe-skyrock
Return:
  • string url
  • string avatar_url
  • string avatar_big_url
  • string title
  • string description (Rich Text)
  • timestamp created_at
  • timestamp updated_at
  • int nb_posts
  • int nb_comments
  • int id_skin
  • int nb_posts_by_page
  • string posts_order
  • bool comments_enabled
  • bool smileys_enabled

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
set

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

Parameters:
  • string title (optional) -- Blog's title
  • string description (optional) -- Blog's description
  • int id_skin (optional) -- Blog's skin template id
  • int nb_posts_by_page (optional) -- Blog's number of posts by page -- Possible values : 1 to 10
  • bool posts_order (optional) -- Blog's number of posts by page -- Possible values : 0 (default order), 1 (reverse order)
  • bool comments_enabled (optional) -- Set blog's comments posting -- Possible values : 0 (disabled), 1 (enabled)
  • bool validate_comments (optional) -- Set blog's comments to be validated before display -- Possible values : 0 (disabled), 1 (enabled)
  • bool smileys_enabled (optional) -- Set blog's comments text smileys to be displayed as smiley images -- Possible values : 0 (disabled), 1 (enabled)
  • bool display_visits (optional) -- Set blog's visits display -- Possible values : 0 (disabled), 1 (enabled)
  • string comment_policy (optional) -- Blog's comments policy -- Possible values:
    • everybody
    • registered_users
    • friends
Return:
  • bool Success
change_avatar

Changes authenticated user's blog avatar.

URL: https://api.skyrock.com/v2/blog/change_avatar.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • data picture -- Image file (using the multipart/form-data MIME)
Return:
  • bool Success
list_posts

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

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • int page (optional) -- Page number
  • bool with_secret (optional) -- Allow authenticated blog owner to show secret posts (false by default)
  • string output_format (optional) -- Defines which format to output, for specific rich text fields. Possible values : 'html' (default), 'bbcode'
  • Example: https://api.skyrock.com/v2/blog/list_posts.json?username=lequipe-skyrock&page=1
Return:
  • int id_post
  • string url
  • string title (Rich Text)
  • string text (Rich Text)
  • timestamp created_at
  • timestamp updated_at
  • bool online
  • bool secret
  • string media_align -- (center_before_content/center_after_content/float_left/float_right)
  • intro bool (only if article is set to intro)
  • array tags
  • array geopoint
  • float latitude
  • float longitude
  • int nb_comments
list_offline_posts

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

Parameters:
  • int page (optional) -- Page number
  • bool with_secret (optional, default = false) -- Allow authenticated blog owner to show secret posts
  • string output_format (optional) -- Defines which format to output, for specific rich text fields. Possible values : 'html' (default), 'bbcode'
  • Example: https://api.skyrock.com/v2/blog/list_offline_posts.json?page=1
Return:
  • int id_post
  • string url
  • string title (Rich Text)
  • string text (Rich Text)
  • timestamp created_at
  • timestamp updated_at
  • bool online
  • bool secret
  • string media_align -- (center_before_content/center_after_content/float_left/float_right)
  • intro bool (only if article is set to intro)
  • array tags
  • array geopoint
  • float latitude
  • float longitude
  • int nb_comments
new_post

Creates a new blog post.

URL: https://api.skyrock.com/v2/blog/new_post.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string title -- Title of the post
  • string text (optional) -- Text contents of the post
  • bool online (optional) -- Whether the new post should be published (true by default)
  • bool secret (optional) -- Whether the new post should be secret (false by default)
  • string tags (optional) -- List of tags separated by commas
  • string latitude (optional) -- Latitude of the geographical position
  • string longitude (optional) -- Longitude of the geographical position
  • string media_type (optional) -- Media file type -- Possible values:
    • image
    • external -- For external medias: video, widget or link
  • file media_file (optional) -- Media file uploaded, required for media types "image" (using base64 encoded file or the multipart/form-data MIME)
  • string media_info (optional) -- External URL, for shared content -- Required with media type "external"
  • string media_image_width (optional) -- Applies to media_type = 'image' only. Defines width applied to attached image, in pixels
  • string media_align (optional) -- Alignment of media included in the post -- Possible values:
    • center_before_content
    • center_after_content
    • float_left
    • float_right
Return:
  • array new post data:
    • int id_post -- Identifier of the newly created post
    • string post_url -- URL of the newly created post
get_post

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

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • string id_post -- Post id
  • string output_format (optional) -- Defines which format to output, for specific rich text fields. Possible values : 'html' (default), 'bbcode'
  • Example: https://api.skyrock.com/v2/blog/get_post.json?username=lequipe-skyrock&id_post=123456789
Return:
  • int id_post
  • string url
  • string title (Rich Text)
  • string text (Rich Text)
  • timestamp created_at
  • timestamp updated_at
  • bool online
  • bool secret
  • string media_align -- (center_before_content/center_after_content/float_left/float_right)
  • array tags
  • array geopoint
  • float latitude
  • float longitude
  • int nb_comments
set_post

Edits a blog post

URL: https://api.skyrock.com/v2/blog/set_post.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_post -- Post's id
  • string title -- Title of the post
  • string text -- Text contents of the post
  • bool online -- Whether the post should be published
  • bool secret -- Whether the post should be secret
  • string tags (optional) -- Comma-separated tags list
Return:
  • bool Success
delete_post

Deletes a blog post

URL: https://api.skyrock.com/v2/blog/delete_post.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_post -- Post's id
Return:
  • bool Success
list_post_medias

Returns a post's medias list.

URL: https://api.skyrock.com/v2/blog/list_post_medias.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • int id_post -- Post id
Return:
  • int id_media (-1 if not applicable)
  • int media_number (for identifying the media within the post)
  • int media_thumb url of media preview picture (100px*100px)
  • string media_type (Possible values : image, video, widget, ...)
  • string media_html
  • string media_url
new_post_media

Associates media with a blog post.

URL: https://api.skyrock.com/v2/blog/new_post_media.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_post -- Identifier of the post
  • string media_type -- Media file type -- Possible values:
    • image
    • external -- For external medias: video, widget or link
  • file media_file (optional) -- Media file uploaded, required for media type "image" (using base64 encoded file or the multipart/form-data MIME)
  • string media_info (optional) -- External URL, for shared content -- Required with media type "external"
  • string media_image_width (optional) -- Applies to media_type = 'image' only. Defines width applied to attached image, in pixels
  • string media_align (optional) -- Alignment of media included in the post -- Possible values:
    • center_before_content
    • center_after_content
    • float_left
    • float_right
Return:
  • int id_media (-1 if not applicable)
  • int media_number (for identifying the media within the post)
  • int media_thumb url of media preview picture (100px*100px)
  • string media_type (Possible values : image, video, widget, ...)
  • string media_html
  • string media_url
delete_post_media

Deletes a post's media.

URL: https://api.skyrock.com/v2/blog/delete_post_media.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_post -- Identifier of the post
  • int id_media -- Post's media id
Return:
  • bool Success
list_post_comments

List a post's comments.

URL: https://api.skyrock.com/v2/blog/list_post_comments.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • int id_post -- Post's id
  • int page (optional) -- Page number
Return:
  • array comments :
  • string post_url
  • int id_post
  • int id_comment
  • timestamp date
  • string content
  • bool is_unread
  • array author:
If the poster is a skyrock.com user, return these fields :
  • int id_user
  • string username
  • string user_url
  • string avatar_url
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
  • bool is_online
If the user is NOT a skyrock.com user, return these fields :
  • string username
get_post_comment

Returns a post's comment:

URL: https://api.skyrock.com/v2/blog/get_post_comment.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • int id_post -- Post's id
  • int id_comment -- Post's comment id
Return:
  • string post_url
  • int id_post
  • int id_comment
  • timestamp date
  • string content
  • bool is_unread
  • array author:
If the poster is a skyrock.com user, return these fields :
  • int id_user
  • string username
  • string user_url
  • string avatar_url
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
  • bool is_online
If the user is NOT a skyrock.com user, return these fields :
  • string username
list_skins

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
Return:
  • array :
  • string category
  • array list:
  • int id_skin
  • string name
list_pictures

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

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • int page (optional)
Return:
  • array picture list:
    • int id_picture -- Picture identifier
    • string description -- Picture description
    • string thumb_url -- Picture URL, thumbnail-sized
    • string picture_url -- Picture URL

Profile Methods

get

Returns an user's profile public data.

URL: https://api.skyrock.com/v2/profile/get.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • string output_format (optional) -- Defines which format to output, for specific rich text fields. Possible values : 'html' (default), 'bbcode'
  • Example: https://api.skyrock.com/v2/profile/get.json?username=lequipe-skyrock
Return:
  • string username
  • string profile_url
  • array avatar
  • 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
  • string birth_date (Format: YYYY-MM-DD)
  • string description (Rich Text)
  • array location
  • array geopoint
  • float latitude
  • float longitude
  • string place -- City
  • string type -- Geolocation setting -- Possible values : auto, manual
  • int smoker
  • int status
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
  • int gender_preference
  • int looks_for
  • int age
  • string town
  • string country
  • int occupation
  • int place
  • int personality
  • int hair_color
  • int eye_color
  • int height
  • int weight
  • array spoken_languages
  • string code
  • int level
  • timestamp last_connection
  • int nb_visits
  • int astrological_sign
  • int nb_comments -- Number of picture comments
set

Set an user's profile public data.

URL: https://api.skyrock.com/v2/profile/set.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string birth_date (Format: YYYY-MM-DD)
  • string description
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
  • int gender_preference
  • int looks_for
  • int status
  • string town
  • string country
  • int region
  • int occupation
  • int place
  • int personality
  • int smoker
  • int hair_color
  • int eye_color
  • int height
  • int weight
  • int show_last_blog_posts
Return:
  • bool Success
add_album

Adds an album to the profile.

URL: https://api.skyrock.com/v2/profile/add_album.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string title -- Album's title
Return:
  • int id_album
list_albums

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

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
Return:
  • array albums list:
    • int id_album -- Album identifier
    • int id_cover -- Album's cover identifier
    • string title -- Album's title
    • int nb_photos -- Number of photos
    • int available_slots -- Remaining slots left for uploading new photos
set_album

Sets an album's title.

URL: https://api.skyrock.com/v2/profile/set_album.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_album -- Album identifier
  • string title -- Album's title
Return:
  • bool Success
delete_album

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

Parameters:
  • int id_album -- Album identifier
Return:
  • bool Success
add_picture

Adds a picture to the profile.

URL: https://api.skyrock.com/v2/profile/add_picture.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_album -- Album identifier where the picture will be added to (Defaults to main album)
  • file picture -- Picture file uploaded (using base64 encoded file or the multipart/form-data MIME)
  • string description -- Picture description
  • bool as_main -- Whether the new picture should be defined as the profile's main picture
Return:
  • 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
  • bool main -- Whether the new picture should is defined as the profile's main picture
list_pictures

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

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • int id_album
Return:
  • array picture list:
    • 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
    • bool main -- Whether the picture is defined as the profile's main picture
    • int nb_comments -- Number of picture comments
get_picture

Returns a specified picture.

URL: https://api.skyrock.com/v2/profile/get_picture.json

HTTP Method(s): GET

Authentication: yes

Parameters:
  • int id_album -- Album identifier
  • int id_picture -- Picture identifier
Return:
  • 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
  • bool main -- Whether the picture is defined as the profile's main picture
  • int nb_comments -- Number of picture comments
set_picture

Sets a picture's properties.

URL: https://api.skyrock.com/v2/profile/set_picture.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_picture -- Picture identifier
  • int id_album -- Album identifier
  • string description -- Picture description (Optional, overwritten only if set)
  • bool as_main -- Set picture as main (Optional, if set, the id_album argument must be set to main album)
Return:
  • bool Success
delete_picture

Deletes a picture.

URL: https://api.skyrock.com/v2/profile/delete_picture.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_picture -- Picture identifier
  • int id_album -- Album identifier
Return:
  • bool Success
get_config

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
set_config

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
Return:
  • bool Success
get_property_values

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

Parameters:
  • string property, possible values :
  • 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
Return:
  • array property:
  • string property
  • string title
  • array values
set_tags

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

Parameters:
  • string <tag_type_1> -- Values are comma separated (See get_tags_types for valid tags types)
  • string <tag_type_2> -- Values are comma separated (See get_tags_types for valid tags types)
  • string <...>
  • Example:
  • POST https://api.skyrock.com/v2/profile/set_tags.xml
  • POST Data music=Rap,Rock&people=Pimalewe
Return:
  • bool Success
get_tags

Returns an user profile's tags.

URL: https://api.skyrock.com/v2/profile/get_tags.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated)) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
Return:
  • array tags
get_tags_types

Returns user profile's tags types.

URL: https://api.skyrock.com/v2/profile/get_tags_types.json

HTTP Method(s): GET

Authentication: no

Return:
  • array tags_types
get_background

Returns user profile's background image informations

URL: https://api.skyrock.com/v2/profile/get_background.json

HTTP Method(s): GET

Authentication: no

Return:
  • array :
  • string picture_url
  • string thumb_url
  • string position
add_background

Adds a background image to user's profile

URL: https://api.skyrock.com/v2/profile/add_background.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string position (optional) -- Background position (Possible values : "left", "right", "center", "mosaic", "fullscreen" - Defaults to "fullscreen")
  • file picture -- Picture file uploaded (using base64 encoded file or the multipart/form-data MIME)
Return:
  • bool Success
set_background_position

Sets user profile's background image position

URL: https://api.skyrock.com/v2/profile/set_background_position.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string position -- Background position (Possible values : "left", "right", "center", "mosaic", "fullscreen")
Return:
  • bool Success
delete_background

Delete user profile's background image

URL: https://api.skyrock.com/v2/profile/delete_background.json

HTTP Method(s): POST

Authentication: yes

Return:
  • bool Success

Mood Methods

list_moods

Returns an user's mood list.

URL: https://api.skyrock.com/v2/mood/list_moods.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
Return:
  • string message
  • int id_mood
  • timestamp update -- last update time
get_mood

Returns an user last mood.

URL: https://api.skyrock.com/v2/mood/get_mood.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
Return:
  • string message
  • int id_mood
  • timestamp update -- last update time
set_mood

Sets an user's mood.

URL: https://api.skyrock.com/v2/mood/set_mood.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string message -- Message, 140 chars max
Return:
  • bool Success
delete_mood

Deletes an user's mood.

URL: https://api.skyrock.com/v2/mood/delete_mood.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_mood -- Mood message ID
Return:
  • bool Success

Newsfeed Methods

send_event

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

Parameters:
  • string message -- plain text, use special tag <url> and url parameter for a link (see example)
  • string url (optional) -- a distinct URL referring to the event, URL is restricted to .skyrock.com/ or «APPLICATION_URL»/*
Return:
  • bool Success
Example:

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
send_alert

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

Parameters:
  • string message -- plain text, use special tag <url> and url parameter for a link (see example)
  • string url (optional) -- a distinct URL referring to the alert, URL is restricted to .skyrock.com/ or «APPLICATION_URL»/*
Return:
  • bool Success
Example:

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

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

Parameters:
  • string events_category -- Possible values:
    • own: display own events
    • friends: display friends' events
Return:
  • array events:
    • string id_event Event's identifier
    • string type Event's type
    • timestamp timestamp Event's timestamp
    • string url Event's url
    • string content Event's message in HTML
    • array from User details:
      • int id_user
      • string username
      • string avatar_url
      • string user_url
      • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
      • bool is_online
list_events_types

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

Return:
  • array events_types:
    • string type Event's type name, as returned by the type field of list_events method
    • string description Description in english
list_alerts

List user's alerts (notifications).

URL: https://api.skyrock.com/v2/newsfeed/list_alerts.json

HTTP Method(s): GET

Authentication: yes

Return:
  • array alerts:
    • string id_alert Alert's identifier
    • string type Alert's type
    • timestamp timestamp Alert's timestamp
    • string url Alert's url
    • string content Alert's message in HTML
    • bool is_unread Whether the alert is unread
    • array from User details:
      • int id_user
      • string username
      • string avatar_url
      • string user_url
      • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
      • bool is_online
list_alerts_types

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

Return:
  • array events_types:
    • string type Alert's type name, as returned by the type field of list_alerts method
    • string description Description in english

Message Methods

list_threads

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

Parameters:
  • string filter -- Thread selection filter (all/unread)
  • int page -- Page number (optional)
Return:
  • array:
    • int id_thread -- Thread identifier
    • int id_sender -- Sender identifier
    • array receivers -- User identifiers of the recipients
    • timestamp created_on -- Thread creation time
    • timestamp updated_on -- Last update time
    • bool is_unread -- Whether the thread is unread
    • int nb_messages -- Total number of messages in the thread
    • string subject -- Thread subject
    • string last_message_intro -- Intro of the last message in the thread
get_thread

Returns a message thread (15 messages per page).

URL: https://api.skyrock.com/v2/message/get_thread.json

HTTP Method(s): GET

Authentication: yes

Parameters:
  • int id_thread -- Identifier of the message thread
  • int page -- Page number (optional)
Return:
  • array:
    • int id_thread -- Thread identifier
    • timestamp timestamp -- Thread creation time
    • string subject -- Thread subject
    • bool is_unread -- Whether the thread is unread
    • array messages:
      • int id_message -- Message identifier
      • timestamp timestamp -- Message creation time
      • string content -- Message content
      • bool is_unread -- Whether the message is unread
      • array from:
        • int id_user -- Sender identifier
        • string user_name -- Sender username
        • string avatar_url -- URL of the sender's avatar image
        • string user_url -- URL of the sender's blog or profile
      • array to:
        • int id_user -- Recipient identifier
        • string user_name -- Recipient username
        • string avatar_url -- URL of the recipient's avatar image
        • string user_url -- URL of the recipient's blog or profile
set_thread_as_read

Marks a message thread as read.

URL: https://api.skyrock.com/v2/message/set_thread_as_read.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_thread -- Identifier of the message thread
Return:
  • bool Success
delete_thread

Deletes a message thread.

URL: https://api.skyrock.com/v2/message/delete_thread.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_thread -- Identifier of the message thread
Return:
  • bool Success
delete_message

Deletes a message.

URL: https://api.skyrock.com/v2/message/delete_message.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_thread -- Identifier of the thread containing the message
  • int id_message -- Message identifier
Return:
  • bool Success
send_message

Sends a message to a single recipient.

URL: https://api.skyrock.com/v2/message/send_message.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string username -- Recipient username
  • string subject -- Message subject (optional, max. 200 characters)
  • string content -- Message content (in plain text format, max. 6000 characters)
Return:
  • int id_message Message identifier
  • int id_thread Thread identifier
create_thread

Creates a multi-recipient thread.

URL: https://api.skyrock.com/v2/message/create_thread.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string usernames -- Comma-separated list of recipient usernames
  • string subject -- Message subject (optional, max. 200 characters)
  • string content -- Message content (in plain text format, max. 6000 characters)
Return:
  • int id_message Message identifier
  • int id_thread Thread identifier
reply_thread

Replies to a thread.

URL: https://api.skyrock.com/v2/message/reply_thread.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_thread -- Thread identifier
  • string content -- Message content (in plain text format, max. 6000 characters)
Return:
  • int id_message Message identifier
  • int id_thread Thread identifier

Search Methods

users

Search users by username.

URL: https://api.skyrock.com/v2/search/users.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • string q -- Search terms
  • int page (optional)
  • Example: https://api.skyrock.com/v2/search/users.json?q=lepima
Return:
  • int max_page
  • array users:
  • int id_user
  • bool is_online
  • string avatar_url
  • string user_url
  • string username
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)
posts

Search public blog posts.

URL: https://api.skyrock.com/v2/search/posts.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • string q -- Search terms
  • string contains (optional) -- Possible values: "picture", "video", "song"
  • string lang (optional) -- Language of the query - Possible values: "fr" (default), "en" - If authenticated, defaults to user language, "fr" otherwise
  • int page (optional)
  • Example: https://api.skyrock.com/v2/search/posts.json?q=citrouille&contains=picture
Return:
  • int max_page
  • array posts:
  • int id_user
  • int id_post
  • string url
  • string title
  • string excerpt
  • timestamp updated_at
profiles

Search public profiles.

URL: https://api.skyrock.com/v2/search/profiles.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • string gender (optional) -- Possible values: "boys", "girls", "both"
  • string age (optional) -- Possible range values: "18,25", "16,20", "18,22", "22,25", "26,35", "16,99", "35,99"
  • string geocode -- Format : "latitude,longitude,radius", radius must be specified in kilometers among these values : 5, 10, 25, 50 and 100 - Example : "48.865101,2.349711,5" -- Returns online users located within a given radius of the given latitude/longitude. (online users only)
  • bool online (optional)
  • bool with_photo (optional)
  • string relationship_status (optional) -- Possible values: "in_a_relationship", "single", "any"
  • string looking_for (optional) -- Possible values: "boys", "girls", "any"
  • string here_for (optional) -- Possible values: "friendship", "love", "hook-ups"
  • int page (optional)
  • Example: https://api.skyrock.com/v2/search/profiles.json?gender=girls&age=18,25&online=1&with_photo=1&looking_for=boys
Return:
  • int max_page
  • array users:
  • int id_user
  • bool is_online
  • string avatar_url
  • string user_url
  • string username
  • int gender -- 1 (Guy) / 2 (Girl) / 0 (None)

Relationship Methods

list_relations

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

Parameters:
  • int id_user (optional if OAuthenticated) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • string kind (Possible values: friend (default), following, followed_by)
  • string order_by (Possible values: NEWEST_TO_OLDEST (default), OLDEST_TO_NEWEST, ONLINE_FIRST, ALPHA)
  • int page (optional)
  • Example: https://api.skyrock.com/v2/relationship/list_relations.json?username=lequipe-skyrock&kind=friend
Return:
  • int nb_relations
  • int max_page
  • string kind
  • array relations:
  • 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)
list_relations_ids

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

Parameters:
  • int id_user (optional if OAuthenticated) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • string kind (Possible values: friend (default), following, followed_by)
  • string order_by (Possible values: NEWEST_TO_OLDEST (default), OLDEST_TO_NEWEST, ONLINE_FIRST, ALPHA)
  • int page (optional)
  • Example: https://api.skyrock.com/v2/relationship/list_relations_ids.json?username=lequipe-skyrock&kind=friend
Return:
  • int nb_relations
  • int max_page
  • string kind
  • array relations:
  • int id_user
list_online_relations

Returns an user's online relations.

URL: https://api.skyrock.com/v2/relationship/list_online_relations.json

HTTP Method(s): GET

Authentication: optional

Parameters:
  • int id_user (optional if OAuthenticated) -- Skyrock user id
  • string username (optional if OAuthenticated) -- Skyrock username
  • string kind (Possible values: friend (default), following, followed_by)
  • Example: https://api.skyrock.com/v2/relationship/list_online_relations.json?username=lequipe-skyrock&kind=friend
Return:
  • int nb_relations
  • string kind
  • array relations:
  • 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)
is_following

Check whether user 1 is following user 2.

URL: https://api.skyrock.com/v2/relationship/is_following.json

HTTP Method(s): GET

Authentication: yes

Parameters:
  • int id_user_1 (optional if OAuthenticated) -- Skyrock user id
  • int id_user_2 -- Skyrock user id
  • Example: https://api.skyrock.com/v2/relationship/is_following.json?id_user_1=33265738&id_user_2=7569711
Return:
  • bool true if user 1 is following user 2, false otherwise
is_followed_by

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

Parameters:
  • int id_user_1 (optional if OAuthenticated) -- Skyrock user id
  • int id_user_2 -- Skyrock user id
  • Example: https://api.skyrock.com/v2/relationship/is_followed_by.json?id_user_1=33265738&id_user_2=7569711
Return:
  • bool true if user 1 is followed by user 2, false otherwise
is_friend

Check friend relation between two users.

URL: https://api.skyrock.com/v2/relationship/is_friend.json

HTTP Method(s): GET

Authentication: yes

Parameters:
  • int id_user_1 (optional if OAuthenticated) -- Skyrock user id
  • int id_user_2 -- Skyrock user id
  • Example: https://api.skyrock.com/v2/relationship/is_friend.json?id_user_1=33265738&id_user_2=7569711
Return:
  • bool true if users are friends, otherwise will return false.
follow

Follows an user.

URL: https://api.skyrock.com/v2/relationship/follow.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_user -- Skyrock user id
  • string username (optional) -- Skyrock username
Return:
  • array
  • bool success
  • bool is_friend -- Defines user added as friend
unfollow

Unfollows an user.

URL: https://api.skyrock.com/v2/relationship/unfollow.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • int id_user -- Skyrock user id
  • string username (optional) -- Skyrock username
Return:
  • bool Success
set_seen

Set relations last seen timestamp.

URL: https://api.skyrock.com/v2/relationship/set_seen.json

HTTP Method(s): POST

Authentication: yes

Parameters:
  • string kind (Possible values: friend, following, followed_by)
Return:
  • bool Success

Request rate limits

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)

You have two ways to monitor the current rate limit:
  • 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

Error messages

The API always replies to a request with the HTTP status code and a formatted error message.

List of HTTP error status codes:
  • 400: Bad Request: the request is ill-formed
  • 401: Permission denied: unauthorized access
  • 403: Forbidden: access was refused (for example when the request rate limit is exceeded)
  • 404: Not Found: unknown resource
  • 500: Server Error: server error during the call
  • 503: Service Unavailable: malfunction in the Skyrock platform

Changelog

01 aug 2013

Features:

Profile: added new methods related to background image
  get_background
  add_background
  set_background_position
  delete_background

25 jun 2013

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

06 may 2013

Changes:

User: removed pending_invitations_vip from get_counters
User and Blog : removed best friends interactions

16 apr 2013

Changes:

Removed media_align parameter from Blog / set_post method

26 mar 2013

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)

17 jan 2013

Features:

User: add pending_invitations_vip in get_counters

17 dec 2012

Features:

Profile: add location: geopoint, place and type in get

06 dec 2012

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

22 nov 2012

Features:

New namespace Search: posts, profiles and users methods added

07 nov 2012

Features:

Blog: add geopoint (latitude and longitude coordinates) in get_post, list_posts and list_offline_posts method

14 jun 2012

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

17 apr 2012

Features:

User: new method is_friend

27 mar 2012

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

01 mar 2012

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

02 feb 2012

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

12 jan 2012

First release of new OAuth API V2.