sessions

Verify login step for multi factor authentication (MFA).

Description

To enable MFA on a Smarkets account:<br>

  • Go to <a href="https://smarkets.com/account/settings/login">login settings</a> and click "Enable Two-Factor Authentication"<br>
  • Copy the secret into your TOTP library<br>
  • Generate one code using it and paste it in the dialog<br>
  • Click "Enable Two-Factor Authentication"<br>

Every time you login: <br>

  • Make a POST request to /v3/sessions/ to get a token<br>
  • Make a POST request to this route with the token and the code generated by you to complete the login<br>
post/v3/sessions/verify/

Request body

codestring required

This code is generated as a time based one-time password (TOTP)

tokenstring nullable required

This session token can be used to make authenticated requests to Smarkets.<br> We will resolve the who the user is based on this.<br> Account information, orders, up-to-date prices are examples that will require it to be sent.

Example request

{
  "code": "375912",
  "token": "WzM2NjI1MDIsMjIyMDIxMzJd.jKWaw5j3XtYX6huY7HZVEvISu6k"
}

Response

Token response for old and new auth v2.

OR

Example response

{
  "created_social_member": true,
  "factor": "complete",
  "nemid_session_id": "776071e7-6b96-41af-8fa2-7fed98e227fd",
  "redirect_url": "https://test.zignsec.com/v2/Hosted/776071e7-6b96-41af-8fa2-7fed98e227fd/nemid/",
  "stop": "2018-01-24T19:49:43.964757",
  "token": "WzM2NjI1MDIsMjIyMDIxMzJd.jKWaw5j3XtYX6huY7HZVEvISu6k",
  "verify": true
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.