Modifications

Sauter à la navigation Sauter à la recherche
680 octets ajoutés ,  7 janvier 2015 à 07:14
Ligne 63 : Ligne 63 :  
  POST /oauth/token
 
  POST /oauth/token
   −
You must give a valid client ID and password in HTTP Basic Auth. Any client ID will work right now, so we suggest spark:spark. In the POST body, you need three parameters:
+
You must give a valid client ID and password in HTTP Basic Auth. Any client ID will work right now, so we suggest '''spark:spark''' (''utilisateur:mot_de_passe''). In the POST body, you need three parameters:
 
* grant_type=password
 
* grant_type=password
 
* username=YOUR_EMAIL@ADDRE.SS
 
* username=YOUR_EMAIL@ADDRE.SS
Ligne 80 : Ligne 80 :  
For now, Spark Build will list the single most recently created token.
 
For now, Spark Build will list the single most recently created token.
    +
=== Lister tous vos tokens ===
 +
You can list all your access tokens by passing your email address and password in an HTTP Basic Auth header to '''/v1/access_tokens'''.
 +
 +
  GET /v1/access_tokens
 +
 +
<nowiki># Using curl in your terminal
 +
curl https://api.spark.io/v1/access_tokens -u joe@example.com:SuperSecret
 +
 +
# Example JSON response
 +
[
 +
    {
 +
        "token": "b5b901e8760164e134199bc2c3dd1d228acf2d98",
 +
        "expires_at": "2014-04-27T02:20:36.177Z",
 +
        "client": "spark"
 +
    },
 +
    {
 +
        "token": "ba54b6bb71a43b7612bdc7c972914604a078892b",
 +
        "expires_at": "2014-04-27T06:31:08.991Z",
 +
        "client": "spark"
 +
    }
 +
]</nowiki>
    
{{traduction}}
 
{{traduction}}
    
{{Spark.IO-Could-API-TRAILER}}
 
{{Spark.IO-Could-API-TRAILER}}
29 922

modifications

Menu de navigation