KEMBAR78
An introduction to mixi Graph API | PPTX
An Introduction to mixi API
2




                                                Regarding mixi API




Copyright (C) mixi, Inc. All rights reserved.
3


  About mixi Apps API & mixi Graph API

mixi Platform
Base to create mixi application and services using the social graph
  ・mixi Graph API
     API that can be used by Web services or from various devices
  ・mixi Apps
     An application that runs inside mixie.g. Sunshine Bokujyo)


       Web service
                           mixi Graph API                                      mixi
                                                                             mixi Apps API
        Application




                                                                                mixi Applications




                             Copyright (C) mixi, Inc. All rights reserved.
4


    List of mixi Graph API (http://developer.mixi.co.jp/en/connect/mixi_graph_api/mixi_io_spec_top/)


The following API are the available mixi Graph API for developers to use. By using the
relevant API, a developer can create a highly social experience for users.
     Category              API                                                          API capabilities

  Profile related   People API             Can acquire information or IDs of a user or his/her friends

                    Groups API             Can acquire information on the groups the user manages. (e.g.
                                           name of the group, group ID).
                    People lookup API      Can find the user IDs for a friend by searching using an email
                                           address
                    Profile Image API      Can acquire profile pictures for a user or his//her friends. Also
                                           this API allows user to modify his/her own profile picture
  Content           Voice API              Can post and acquire mixi Voice posts

                    Diary API              Can post a diary entry

                    Photo API              Can acquire and post photos in the mixi albums

                    Check-in API           Can acquire and post check-in information

  Information       Updates API            Can acquire friend updates
  Updates
                    Check API              Can post the mixi check feed

  Message           Message API            Can send and acquire messages to and from friends

                                        Copyright (C) mixi, Inc. All rights reserved.
5


    List of mixi Apps API (http://developer.mixi.co.jp/en/appli/spec/)

The following API are the available mixi Apps API for developers to use. By using the
relevant API, a developer can create a rich application experience for users.
     Category                   API                                                   API capabilities

 Profile related   People API                            Can acquire information or IDs of a user or his/her
                                                         friends
 Content           Photo API                             Can acquire and post photos in the mixi albums

                   Voice APIposting only               Can post mixi Voice posts

                   Community API                         Can acquire information on what types of mixi
                                                         communities the user participates in
 Notification      Message APISending                   Can send messages to friends
                   only
                   Request API                           Can send requests to friends

                   Invite API                            Can send friends invitations to a particular app

                   Communication Feed API                Can inform friends of a user’s actions performed in an
                                                         application
 Storing data      Persistence API                       Can save and acquire user information on the mixi
                                                         server
 Payment           Payment API                           Allows the use of the mixi payment system

                                      Copyright (C) mixi, Inc. All rights reserved.
6


                 The difference between mixi Graph and mixi Apps

mixi Graph API Delivers API that enables various methods to use mixi contents
mixi Apps APIDelivers API that promotes sharing among friends
                      Profile                                                                            Information
                                       Content                                   Notification
                      related                                                                              Updates

                     People API          Voice API                               Message API              Updates API
mixi Graph API




                     Groups API          Diary API                                                         Check API

                  People lookup API     Photo API

                  Profile ImageAPI     Check-in API


                                                                                 Message API               Payment
                     People API         Photo API                            only sending capability
                                                                                                          Payment API
Mixi Apps




                                      Voice APIonly                             Request API
                                       posting capability

                                      Communication                                                       Storing data
                                                                                    Invite API
                                          API
                                                                              Communication              Persistence API
                                                                                Feed API

                                                Copyright (C) mixi, Inc. All rights reserved.
7




          Case examples of using mixi API
                  mixi Graph API version




Copyright (C) mixi, Inc. All rights reserved.
8


Case examples of using mixi APImixi Graph API version


People API can be used to acquire a list of mixi friends for a user and then a
    “follow” function can be built into the application to promote further
                        engagement among friends




                                                                            machi




                            Copyright (C) mixi, Inc. All rights reserved.
9


Case examples of using mixi APImixi Graph API version


The Message API can be used to allow users to invite their friends to start
                    using a particular application




                          Copyright (C) mixi, Inc. All rights reserved.
10


Case examples of using mixi APImixi Graph API version


Voice API can be used to allow users to post photos using mixi Voice. A link
can be added within the mixi Voice post to redirect users to the application.




                           Copyright (C) mixi, Inc. All rights reserved.
11


  Case examples of using mixi APImixi Graph API version

 With the combination of mixi API: People API・Voice API・Updates API and
 an externally developed API there are many possibilities. For instance if a
 text analyzer API existed it could be used with the mixi API to analyze and
 convey the emotion of a user’s posts
【Emotional Voice】




                         Text Analyzer
    People API                API
   ・General            ・mixi Voice
   information of      test analyzer
   friends




   Updates API
    ・Friend’s recent
    mixi Voice posts



                             Copyright (C) mixi, Inc. All rights reserved.
12


Case examples of using mixi APImixi Graph API version


The Profile Image API can be used to easily update a user’s profile picture
                   straight from an external application




                          Copyright (C) mixi, Inc. All rights reserved.
13




      An introduction of mixi API SDK




Copyright (C) mixi, Inc. All rights reserved.
14


    What is the mixi API SDK?

○    Official library for the native application on
     smartphones


○    Makes it easier to access mixi API
     ○    mixi Graph API
     ○    mixi Apps


○    OS
     ○    Android
     ○    iOS



                           Copyright (C) mixi, Inc. All rights reserved.
15


      What is the mixi API SDK?


             External Service            Smartphone native app                           mixi Apps



Apps
Service




Library                                            mixi API SDK




API                mixi Graph API                                               mixi Apps API




                                Copyright (C) mixi, Inc. All rights reserved.
16


    mixi API SDK features

Features

○    SDK supports the OAuth2.0 authorization
     ○   The access token can be acquired by calling just 1
         method
     ○   The SDK also automatically refreshes (reissues) the
         access token


○    Secure
     ○   For Android, there is no need to add a secret


○    Not only can the SDK be added to new application
    but the SDK can be added to existing applications as
    well
                            Copyright (C) mixi, Inc. All rights reserved.
17


OAuth2.0 Flow

User                      Application                                          mixi

       Starts using the
       application




                                                                                         code
         User
                                                                                Authorization code
         Authorization
                                                                                issued

                                                 code


                                                                                        Token

                                                                                Access token
                                                                                issued
                                               Token

                          Access token acquired



                               Copyright (C) mixi, Inc. All rights reserved.
18


Flow of SDK approval

User                                          Application

       Starts to use the
       application




                                                                                SDK
          User Authorization




                                                       Token

                               Access Token Acquired



                                       Copyright (C) mixi, Inc. All rights reserved.
19


Flow of SDK approvaldiagram of SDK’s intermediary function

User                                       Application                                      mixi

       Starts to use the
       application
                                                                             SDK



                                                                             SDK



                                                                                                      code
          User Authorization                                                SDK              Authorization code
                                                                                    code
                                                                                             issued




                                                                                                     Token
                                                                             SDK
                                                                                    Token    Access token
                                                                                             issued
                                                    Token

                               Access token acquired



                                    Copyright (C) mixi, Inc. All rights reserved.
20


    mixi API SDK summary

Features
○    Official library for the native application on
     smartphones
     ○   Android
     ○   iOS
○    Facilitates the use of mixi API
○    Supports OAuth2.0
○    Not only can the SDK be added to new application
    but the SDK can be added to existing applications as
    well Why not take it for a test drive?â™Ș



                         Copyright (C) mixi, Inc. All rights reserved.
21




                                                demo




Copyright (C) mixi, Inc. All rights reserved.
22


    demo

Voice API
○    mixi Voice post
○    Supports posts which include photos
    ○   Since mixi saves the photos, there is no need to keep a separate
        storage of photos




                          Copyright (C) mixi, Inc. All rights reserved.
23


      Voice API


             External Service            Smartphone native app                           mixi Apps



App
Service




Library                                            mixi API SDK



              Voice API
API                  mixi Graph API                                             mixi Apps API




                                Copyright (C) mixi, Inc. All rights reserved.
24


demo




              Easily post a
       mixi Voice using the SDK☆




               Copyright (C) mixi, Inc. All rights reserved.
25


      Coding example using the SDK (for Android)

Authorization

mContainer.authorize(TestActivity.this, new String[]
{"r_profile","w_voice"}, CODE,
      new CallbackListener() {
         @Override
         public void onComplete(Bundle values) {
              // Success
         }


});




                                 Copyright (C) mixi, Inc. All rights reserved.
26


      Coding example using the SDK (for Android)

Posting a mixi Voice

Map params = new HashMap();
params.put("status", “HELLO");
mContainer.send("/voice/statuses/update", HttpMethod.POST, params, new Callback()
{
      @Override
      public void onComplete(Bundle values) {
          // Success
      }


});




                                Copyright (C) mixi, Inc. All rights reserved.
27


demo




           Easily post a
       mixi Voice using mixi
              Graph☆




             Copyright (C) mixi, Inc. All rights reserved.
28


    Voice API

Posting a mixi Voice

POST http://api.mixi-
platform.com/2/voice/statuses/update
POST http://api.mixi-platform.com/2/voice/statuses
Parameter        Value
status           mixi Voice body, contentsURI encoded withUTF-8



Use curl to post“Thanks for your help”using mixi
Voice
curl -v -H ‘Authorization: OAuth 【please include your access token】'

-d 'status=%E3%81%8A%E7%96%B2%E3%82%8C%E3%81%95%E3%81%BE%E3%83%BC' 
'http://api.mixi-platform.com/2/voice/statuses/update'
                           Copyright (C) mixi, Inc. All rights reserved.
29


  【For reference】Acquiring an access token

①Register the application and acquire the credential
information of the application
http://developer.mixi.co.jp
②Get authorization from the user. Access using the
browser with the following
http://mixi.jp/connect_authorize.pl?client_id=【include your
Consumer key】
&type=web_server&scope=r_voice w_voice
           ※This example is for getting authorization                         for posting and acquiring a mixi
              Voice post

                                         If users select“Agree” they are
                                         redirected to the redirect URL of the
                                         application
                                                ăƒ‘ăƒ©ăƒĄăƒŒă‚żć                           怀
                                                code                             Authorization code

                              Copyright (C) mixi, Inc. All rights reserved.
30


    【For reference】Acquiring an access token

⑱Acquire the access token

curl 'https://secure.mixi-platform.com/2/token' 
-d 'grant_type=authorization_code' 
-d ‘client_id=【insert Consumer key here】' 
-d ‘client_secret=【insert Consumer secret here】' 
-d ‘code=【Please insert the Authorization code acquired from step 2】'

-d ‘redirect_uri=【Please include the redirect link here】'



For more information please refer to the following
webpage
http://developer.mixi.co.jp/connect/mixi_graph_api/api_
auth/
                           Copyright (C) mixi, Inc. All rights reserved.
Copyright (C) mixi, Inc. All rights reserved.

An introduction to mixi Graph API

  • 1.
  • 2.
    2 Regarding mixi API Copyright (C) mixi, Inc. All rights reserved.
  • 3.
    3 Aboutmixi Apps API & mixi Graph API mixi Platform Base to create mixi application and services using the social graph ・mixi Graph API API that can be used by Web services or from various devices ・mixi Apps An application that runs inside mixie.g. Sunshine Bokujyo) Web service mixi Graph API mixi mixi Apps API Application mixi Applications Copyright (C) mixi, Inc. All rights reserved.
  • 4.
    4 List of mixi Graph API (http://developer.mixi.co.jp/en/connect/mixi_graph_api/mixi_io_spec_top/) The following API are the available mixi Graph API for developers to use. By using the relevant API, a developer can create a highly social experience for users. Category API API capabilities Profile related People API Can acquire information or IDs of a user or his/her friends Groups API Can acquire information on the groups the user manages. (e.g. name of the group, group ID). People lookup API Can find the user IDs for a friend by searching using an email address Profile Image API Can acquire profile pictures for a user or his//her friends. Also this API allows user to modify his/her own profile picture Content Voice API Can post and acquire mixi Voice posts Diary API Can post a diary entry Photo API Can acquire and post photos in the mixi albums Check-in API Can acquire and post check-in information Information Updates API Can acquire friend updates Updates Check API Can post the mixi check feed Message Message API Can send and acquire messages to and from friends Copyright (C) mixi, Inc. All rights reserved.
  • 5.
    5 List of mixi Apps API (http://developer.mixi.co.jp/en/appli/spec/) The following API are the available mixi Apps API for developers to use. By using the relevant API, a developer can create a rich application experience for users. Category API API capabilities Profile related People API Can acquire information or IDs of a user or his/her friends Content Photo API Can acquire and post photos in the mixi albums Voice APIposting only Can post mixi Voice posts Community API Can acquire information on what types of mixi communities the user participates in Notification Message APISending Can send messages to friends only Request API Can send requests to friends Invite API Can send friends invitations to a particular app Communication Feed API Can inform friends of a user’s actions performed in an application Storing data Persistence API Can save and acquire user information on the mixi server Payment Payment API Allows the use of the mixi payment system Copyright (C) mixi, Inc. All rights reserved.
  • 6.
    6 The difference between mixi Graph and mixi Apps mixi Graph API Delivers API that enables various methods to use mixi contents mixi Apps APIDelivers API that promotes sharing among friends Profile Information Content Notification related Updates People API Voice API Message API Updates API mixi Graph API Groups API Diary API Check API People lookup API Photo API Profile ImageAPI Check-in API Message API Payment People API Photo API only sending capability Payment API Mixi Apps Voice APIonly Request API posting capability Communication Storing data Invite API API Communication Persistence API Feed API Copyright (C) mixi, Inc. All rights reserved.
  • 7.
    7 Case examples of using mixi API mixi Graph API version Copyright (C) mixi, Inc. All rights reserved.
  • 8.
    8 Case examples ofusing mixi APImixi Graph API version People API can be used to acquire a list of mixi friends for a user and then a “follow” function can be built into the application to promote further engagement among friends machi Copyright (C) mixi, Inc. All rights reserved.
  • 9.
    9 Case examples ofusing mixi APImixi Graph API version The Message API can be used to allow users to invite their friends to start using a particular application Copyright (C) mixi, Inc. All rights reserved.
  • 10.
    10 Case examples ofusing mixi APImixi Graph API version Voice API can be used to allow users to post photos using mixi Voice. A link can be added within the mixi Voice post to redirect users to the application. Copyright (C) mixi, Inc. All rights reserved.
  • 11.
    11 Caseexamples of using mixi APImixi Graph API version With the combination of mixi API: People API・Voice API・Updates API and an externally developed API there are many possibilities. For instance if a text analyzer API existed it could be used with the mixi API to analyze and convey the emotion of a user’s posts 【Emotional Voice】 Text Analyzer People API API ・General ・mixi Voice information of test analyzer friends Updates API ・Friend’s recent mixi Voice posts Copyright (C) mixi, Inc. All rights reserved.
  • 12.
    12 Case examples ofusing mixi APImixi Graph API version The Profile Image API can be used to easily update a user’s profile picture straight from an external application Copyright (C) mixi, Inc. All rights reserved.
  • 13.
    13 An introduction of mixi API SDK Copyright (C) mixi, Inc. All rights reserved.
  • 14.
    14 What is the mixi API SDK? ○ Official library for the native application on smartphones ○ Makes it easier to access mixi API ○ mixi Graph API ○ mixi Apps ○ OS ○ Android ○ iOS Copyright (C) mixi, Inc. All rights reserved.
  • 15.
    15 What is the mixi API SDK? External Service Smartphone native app mixi Apps Apps Service Library mixi API SDK API mixi Graph API mixi Apps API Copyright (C) mixi, Inc. All rights reserved.
  • 16.
    16 mixi API SDK features Features ○ SDK supports the OAuth2.0 authorization ○ The access token can be acquired by calling just 1 method ○ The SDK also automatically refreshes (reissues) the access token ○ Secure ○ For Android, there is no need to add a secret ○ Not only can the SDK be added to new application but the SDK can be added to existing applications as well Copyright (C) mixi, Inc. All rights reserved.
  • 17.
    17 OAuth2.0 Flow User Application mixi Starts using the application code User Authorization code Authorization issued code Token Access token issued Token Access token acquired Copyright (C) mixi, Inc. All rights reserved.
  • 18.
    18 Flow of SDKapproval User Application Starts to use the application SDK User Authorization Token Access Token Acquired Copyright (C) mixi, Inc. All rights reserved.
  • 19.
    19 Flow of SDKapprovaldiagram of SDK’s intermediary function User Application mixi Starts to use the application SDK SDK code User Authorization SDK Authorization code code issued Token SDK Token Access token issued Token Access token acquired Copyright (C) mixi, Inc. All rights reserved.
  • 20.
    20 mixi API SDK summary Features ○ Official library for the native application on smartphones ○ Android ○ iOS ○ Facilitates the use of mixi API ○ Supports OAuth2.0 ○ Not only can the SDK be added to new application but the SDK can be added to existing applications as well Why not take it for a test drive?â™Ș Copyright (C) mixi, Inc. All rights reserved.
  • 21.
    21 demo Copyright (C) mixi, Inc. All rights reserved.
  • 22.
    22 demo Voice API ○ mixi Voice post ○ Supports posts which include photos ○ Since mixi saves the photos, there is no need to keep a separate storage of photos Copyright (C) mixi, Inc. All rights reserved.
  • 23.
    23 Voice API External Service Smartphone native app mixi Apps App Service Library mixi API SDK Voice API API mixi Graph API mixi Apps API Copyright (C) mixi, Inc. All rights reserved.
  • 24.
    24 demo Easily post a mixi Voice using the SDK☆ Copyright (C) mixi, Inc. All rights reserved.
  • 25.
    25 Coding example using the SDK (for Android) Authorization mContainer.authorize(TestActivity.this, new String[] {"r_profile","w_voice"}, CODE, new CallbackListener() { @Override public void onComplete(Bundle values) { // Success } }); Copyright (C) mixi, Inc. All rights reserved.
  • 26.
    26 Coding example using the SDK (for Android) Posting a mixi Voice Map params = new HashMap(); params.put("status", “HELLO"); mContainer.send("/voice/statuses/update", HttpMethod.POST, params, new Callback() { @Override public void onComplete(Bundle values) { // Success } }); Copyright (C) mixi, Inc. All rights reserved.
  • 27.
    27 demo Easily post a mixi Voice using mixi Graph☆ Copyright (C) mixi, Inc. All rights reserved.
  • 28.
    28 Voice API Posting a mixi Voice POST http://api.mixi- platform.com/2/voice/statuses/update POST http://api.mixi-platform.com/2/voice/statuses Parameter Value status mixi Voice body, contentsURI encoded withUTF-8 Use curl to post“Thanks for your help”using mixi Voice curl -v -H ‘Authorization: OAuth 【please include your access token】' -d 'status=%E3%81%8A%E7%96%B2%E3%82%8C%E3%81%95%E3%81%BE%E3%83%BC' 'http://api.mixi-platform.com/2/voice/statuses/update' Copyright (C) mixi, Inc. All rights reserved.
  • 29.
    29 【Forreference】Acquiring an access token ①Register the application and acquire the credential information of the application http://developer.mixi.co.jp ②Get authorization from the user. Access using the browser with the following http://mixi.jp/connect_authorize.pl?client_id=【include your Consumer key】 &type=web_server&scope=r_voice w_voice ※This example is for getting authorization for posting and acquiring a mixi Voice post If users select“Agree” they are redirected to the redirect URL of the application ăƒ‘ăƒ©ăƒĄăƒŒă‚żć 怀 code Authorization code Copyright (C) mixi, Inc. All rights reserved.
  • 30.
    30 【For reference】Acquiring an access token ⑱Acquire the access token curl 'https://secure.mixi-platform.com/2/token' -d 'grant_type=authorization_code' -d ‘client_id=【insert Consumer key here】' -d ‘client_secret=【insert Consumer secret here】' -d ‘code=【Please insert the Authorization code acquired from step 2】' -d ‘redirect_uri=【Please include the redirect link here】' For more information please refer to the following webpage http://developer.mixi.co.jp/connect/mixi_graph_api/api_ auth/ Copyright (C) mixi, Inc. All rights reserved.
  • 31.
    Copyright (C) mixi,Inc. All rights reserved.