-
Notifications
You must be signed in to change notification settings - Fork 0
Api
Raffaele Sommese edited this page Mar 23, 2015
·
1 revision
Uri: /oauth
Parametri (POST):
grant_type=password
client_id=student-app
client_secret=student-app-pw
username=xxxx
password=xxx
###Template risposta:
- Accettata: {"access_token":"xxxxxxx", "expires_in":###, "token_type":"Bearer", "scope":null, "refresh_token":"xxxxxxx"}
- Respinta: {"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title":"Unauthorized", "status":401, "detail":xxxx}
##Rigenerazione token:
Uri: /oauth
Parametri (POST):
grant_type=refresh_token
client_id=student-app
client_secret=student-app-pw
refresh_token=xxxxx
"expires_in":###, "token_type":"Bearer", "scope":null}
Uri: /api/question/random
Parametri (POST): access_token=xxxxxxx
Template risposta: {"Id":"###", "Domanda":"xxxxx", "Risposta":"xxxx", "Risposte_Falsa1":"xxxx", "Risposte_Falsa2":"xxxx", "Risposte_Falsa3":"xxxx", "Argomento":"Way"}