Cambios recientes

2017-08-02
2016-03-21

Últimos Comunicados de Prensa Archivo

OSDN API client libraries (experimental-20171120)2017-11-20 17:44
SourceForge (Alexandria 2.5)2016-02-24 15:38

Wiki Guide

Sidebar

OSDN API

OSDN REST API is currently experimental beta. Documentation is not completed.

API Explorer

Currently, we do not provide detailed API references yet. Please refer API Explorer by swagger-UI to get function list.

Application registration

You can register your application with your account page.

Authentication

OSDN API authentication is based on OAuth2.

Auth code grant

First your application needs to route user to auth URL ( https://osdn.net/account/oauth2ui/authorize ) with following query parameters;

  • client_id: application ID you registered
  • state: OAuth state string
  • response_type: set as 'code'
  • scope: (optional) space separated scopes. Currently available scopes are profile, group, group_write, chamber and chamber_write. Default is profile.

If user allow your application to access, they will be redirected back to your application with code in query parameter.

After that, application can get access token and refresh token from API token endpoint ( https://osdn.net/api/v0/token ) with following arguments via POST request;

  • client_id: your application ID (required)
  • client_secret: your application secret (key) (required)
  • grant_type: 'authorization_code' or 'refresh_token'
  • code: authentication code get by auth URL above. (required if grant_type is authcode)
  • refresh_token: refresh token (required if grant_type is refresh_token)

Implicit grant

If your application cannot store client_secret safely, you can use oauth2 implicit grant.

On implicit grant, you can get access token from auth URL ( https://osdn.net/account/oauth2ui/authorize ) directly with following query parameters;

  • client_id: your application ID
  • state: OAuth state string
  • response_type: set as 'token'
  • scope: (optional) space separated scopes. Currently available scopes are profile, group, group_write, chamber and chamber_write. Default is profile.

If user allow to access, user will be redirected to your application with access token in fragment. In this case you cannot get refresh token.

Contact and report issue

Please report to ticket if you find any problem.

Sample client implementations

  • osdn-cli - an command line interface to provide non-interactive operation for OSDN services.
  • client libraries - basic client libraries for each language.