Notes:
- While most fields are capital here, they are actually to be requested in lowercase.
STATUS
is included with most replies from the server, if it is notOK
you won't get all fields back- All requests are POST with the fields being keys in a JSON array
- All of these API endpoints are subject to change as development progresses
Register: Client -> Auth Server ~ EMAIL
, NAME
, KEY
, (PASSWORD
) | http://quik.dah.io/api/v1/account/user/auth/new
- Client sends
EMAIL
,NAME
,KEY
,PASSWORD
to Auth Server EMAIL
Must be uniqueNAME
is your display name and will be displayed case sensitiveKEY
is your public keyPASSWORD
is your complete password hash with salt headers
-> Give Account
Give Account: Auth Server -> Client ~ STATUS
, VERIFIED
, NAME
, DISPLAY
, CREATED
, EMAIL
, KEY
, UUID
- Auth Server sends
STATUS
,VERIFIED
,NAME
,DISPLAY
,CREATED
,EMAIL
,KEY
,UUID
to Client - This is essentially the users profile block with the addition of the
STATUS
field UUID
is your newly generated UUIDNAME
is a lowercase version of theNAME
sent to the serverDISPLAY
is the properly cased versionCREATED
is the time that the account was createdVERIFIED
isFALSE
by default and changes toTRUE
when email verification is complete
-> NONE
Login Req: Client -> Auth Server ~ UUID
, METHOD
| http://quik.dah.io/api/v1/account/user/auth/init
- Client sends
UUID
,METHOD
to Auth Server. METHOD
can be eitherPASSWORD
orSIGNATURE
-> Login Spec
Login Spec: Auth Server -> Client ~ UUID
, STATUS
, LOGIN_SESSION
, (SALT
)
- Auth Server sends
UUID
,LOGIN_SESSION
to Client - Optional field
SALT
is sent if previousMETHOD
wasPASSWORD
STATUS
can beOK
orERRCODE
ERRCODE
is actually a number. A field that's a number with the actual message will be included
-> Login Final
Login Final: Client -> Auth Server ~ UUID
, LOGIN_SESSION
, CLIENT_UUID
, HMAC/SIGNATURE
| http://quik.dah.io/api/v1/account/user/auth/login
- Client sends
UUID
,LOGIN_SESSION
to Auth Server HMAC
is the last 32 digits password hashHMAC
512'd withLOGIN_SESSION
CLIENT_UUID
is theUUID
unique specifically to that device and clientSIGNATURE
is a signature ofLOGIN_SESSION
signed by the user's private key
-> Create Session
Create Session: Auth Server -> Client ~ UUID
, STATUS
, CLIENT_SESSION
- Auth Server sends
UUID
,STATUS
,CLIENT_SESSION
to Client CLIENT_SESSION
is invalid until it's assigned aCLIENT_UUID
STATUS
can beOK
orERRCODE
ERRCODE
is actually a number. A field that's a number with the actual message will be included
-> Validate Session
Validate Session: Client -> Session Server ~ UUID
, CLIENT_SESSION
, CLIENT_UUID
- Client sends
UUID
,CLIENT_SESSION
,CLIENT_UUID
to Session Server CLIENT_UUID
is theUUID
unique specifically to that device and client
-> Renewed Session
Renewed Session: Session Server -> Client ~ STATUS
, IDENT
, CLIENT_SESSION
- Session Server sends
STATUS
,IDENT
to Client CLIENT_SESSION
is regenerated asSTALE
STATUS
can beOK
,ERRCODE
, orROTTEN
OK
means session sucessfully renewedERRCODE
is actually a number. A field that's a number with the actual message will be includedROTTEN
means thatCLIENT_SESSION
had been markedSTALE
too many times (100) or was too old- Client has to login again
-> NONE
- Client has to login again
Remove Session: Client -> Session Server ~ UUID
, CLIENT_SESSION
, CLIENT_UUID
, (IDENT
)
- Client sends
UUID
,CLIENT_SESSION
,CLIENT_UUID
to Session Server IDENT
is included when the client had a previousIDENT
-> Sessions Removed
Sessions Removed: Session Server -> Client ~ STATUS
- Session Server sends
STATUS
to Client STATUS
can beOK
,ERRCODE
, orSTALE
OK
means allCLIENT_SESSION
's andIDENT
's were invalidatedERRCODE
is actually a number. A field that's a number with the actual message will be includedSTALE
meansCLIENT_SESSION
wasSTALE
- Client has to login again to perform this action
-> NONE
- Client has to login again to perform this action
Send Message: Client -> Relay Server ~ UUID
, CLIENT_UUID
, MESSAGE_PAYLOAD
, IDENT
- Client sends
UUID
,CLIENT_UUID
,MESSAGE_PAYLOAD
,IDENT
to Relay Server MESSAGE_PAYLOAD
is a nested array of itemsIDENT
is the key from the Session Server
-> Validate Client
Get Message: Client -> Relay Server ~ UUID
, CLIENT_UUID
, IDENT
, (SIZE
)
- Client sends
UUID
,CLIENT_UUID
,IDENT
to Relay Server SIZE
is an optional field for a specific number of messages, default 25
-> Validate Client
Get New: Client -> Relay Server ~ UUID
, CLIENT_UUID
, IDENT
- Client sends
UUID
,CLIENT_UUID
,IDENT
to Relay Server
-> Verify Client
Verify Client: Relay Server -> Session Server ~ UUID
, IDENT
, CLIENT_UUID
, RELAY_UUID
- Relay Server sends
UUID
,IDENT
,CLIENT_UUID
to Session Server RELAY_UUID
is the UUID specific to that relay serverUUID
is the user'sUUID
-> Approve Client
Approve Client: Session Server -> Relay Server ~ STATUS
- Session Server sends
STATUS
to Relay Server STATUS
can either beOK
,ERRCODE
,EXPIRED
OK
is when all things passERRCODE
is actually a number. A field that's a number with the actual message will be includedEXPIRED
is whenIDENT
is invalid but everything else matches
-> Relay Response
Relay Response: Relay Server -> Client ~ STATUS
, (PAYLOAD
)
- Relay Server sends
STATUS
to Client STATUS
can be the same replies as Approve Client'sSTATUS
PAYLOAD
is included when client requested messages, it is a nested array
-> NONE