Enroll & Activate, Verify Flow
POST /api/v1/users/00TmqQCMPRSYHBDHVWAN/factors HTTP/1.1
Host: your-subdomain.okta.com
Authorization: SSWS yourtoken
Accept: application/json
Content-Type: application/json
{
"factorType" : " totp" ,
"provider" : " okta" ,
"deviceType" : " smartphone:ios" ,
"profile" : {
"deviceName" : " My Office IPhone"
}
}
HTTP/1.1 301 MOVED PERMANENTLY
Location: http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO
Content-Type: application/json
{
"id" : " 00ud4tVDDXYVKPXKVLCO" ,
"factorType" : " totp" ,
"status" : " ENROLLED" ,
"created" : " 2013-06-24T16:39:18.000Z" ,
"activated" : " null" ,
"lastVerification" : " null" ,
"lastUpdated" : " 2013-07-02T21:36:25.344Z" ,
"profile" : {
"deviceName" : " My Office IPhone"
},
"_embedded" : {
"install" : {
"appStore" :<link-to-app>,
"barCode" :<link-to-bar-code-image>
},
"verify" : {
"type" : " passcode" ,
"count" : " 1"
}
},
"_links" : {
"next" : {
"name" :" verify" ,
"href" :" http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO/lifecycle/verify" ,
"hints" : {
"allow" : [" POST" ]
}
},
"self" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO" ,
"hints" : {
"allow" : [" GET" , " DELETE" ]
}
},
"verify" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO/lifecycle/verify" ,
"hints" : {
"allow" : [" POST" ]
}
},
"user" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN" ,
"hints" : {
"allow" : [" GET" ]
}
},
"provider" : {
"href" : " http://rain.okta1.com:1802/api/v1/factors/providers/okta" ,
"hints" : {
"allow" : [" GET" ]
}
}
}
POST /api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO/lifecycle/verify HTTP/1.1
Host: your-subdomain.okta.com
Authorization: SSWS yourtoken
Accept: application/json
Content-Type: application/json
{
"activationCode" : 738402
}
HTTP/1.1 202 ACCEPTED
Content-Type: application/json
{
"id" : " 00ud4tVDDXYVKPXKVLCO" ,
"verificationStatus" : " SUCCESS" ,
"status" : " ACTIVE" ,
"_links" : {
"factor" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO" ,
"hints" : {
"allow" : [" GET" ]
}
}
}
}
Get/Poll Status of the SMS Factor
GET /api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO HTTP/1.1
Host: your-subdomain.okta.com
Authorization: SSWS yourtoken
Accept: application/json
Content-Type: application/json
{
"id" : " 00ud4tVDDXYVKPXKVLCO" ,
"factorType" : " totp" ,
"status" : " ACTIVE" ,
"created" : " 2013-06-24T16:39:18.000Z" ,
"activated" : " 2013-06-24T16:41:18.000Z" ,
"lastVerification" : " 2013-06-24T16:40:18.000Z" ,
"lastUpdated" : " 2013-07-02T21:36:25.344Z" ,
"_embedded" : {
"profile" : {
"deviceName" : " My Office IPhone"
}
},
"_links" : {
"self" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO" ,
"hints" : {
"allow" : [" GET" , " DELETE" ]
}
},
"deactivate" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN/factors/00ud4tVDDXYVKPXKVLCO/lifecycle/deactivate" ,
"hints" : {
"allow" : [" POST" ]
}
},
"user" : {
"href" : " http://rain.okta1.com:1802/api/v1/users/00TmqQCMPRSYHBDHVWAN" ,
"hints" : {
"allow" : [" GET" ]
}
},
"provider" : {
"href" : " http://rain.okta1.com:1802/api/v1/factors/providers/00TmqQCMPRSYHBDHVWAN" ,
"hints" : {
"allow" : [" GET" ]
}
}
}