Update Password by Session (Enterprise)
Update user password using an active session. If the session token does not have an active factor from OTP, magic link, or password, it will return an error.
HTTP Request
GET /v1/auth/passwords/session/update
Request Body
The following table lists the properties of an HTTP request that this action supports.
Returns
A successful response returns user_id
property and session
object associated with the session_token
sent in.
Body
-
Required
Unique user ID to associate the TOTP with.Minimum length is
1
. -
session_token string
Required if session_jwt not present
Session token to identify the user by. Only a valid session will result in a successful password change. -
session_jwt string
Required if session_token not present
Session jwt to identify the user by. Only a valid session will result in a successful password change.
POST /v1/auth/passwords/session/update
curl \
-X POST https://api.streambird.io/v1/auth/passwords/session/update \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"password":"samplepass","session_token":"4KdNDr4QAMekuWssW7IDtF9mlsmkOj8QDRbp7oIGOb3Tv4sE3PjX6j6GypoYNnIB"}'
Request example
{
"password": "samplepass",
"session_token": "4KdNDr4QAMekuWssW7IDtF9mlsmkOj8QDRbp7oIGOb3Tv4sE3PjX6j6GypoYNnIB"
}
Response examples (200)
{
"session": {
"id": "sess_2KF44T13b1clHEoOHpwEmTtldx5",
"user_id": "user_2Cu2uVhYy0OVgRcO913OsqIVaPI",
"started_at": 1673556805,
"expires_at": 1673562817,
"last_active_at": 1673556817,
"factors": [
{
"delivery_channel": "email",
"type": "otp",
"method": {
"method_id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"method_type": "email",
"email_id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"email": "sandbox@streambird.io",
"last_verified_at": 1673556805
}
},
{
"delivery_channel": "password",
"type": "password",
"method": {
"last_verified_at": 1673556817
}
}
],
"device_fingerprint": {
"user_agent": "Chrome",
"ip": ""
},
"permissions": [],
"deleted": false,
"deleted_at": 0,
"updated_at": 1673556817,
"created_at": 1673556805
},
"user_id": "user_2Cu2uVhYy0OVgRcO913OsqIVaPIb"
}