(devices)
- refresh_session - Refresh Cookie
- list_devices_for_user - Devices for a user
- get_device_for_user - Specific device
- disable_device_for_user - Disable device
Refresh the cookie to keep a user logged in
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.devices.refresh_session(request={
"fingerprint": "fBkwz3q43jlTHB8wFtiDgxT0WMpjUmDvMsTbQbz1",
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.DeviceInfo | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.SDKError | 4XX, 5XX | */* |
Returns the list of devices that are currently remembered
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.devices.list_devices_for_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
user_id |
str | ✔️ | Which userID to list the devices of | ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.ListDevicesForUserResponse
Error Type | Status Code | Content Type |
---|---|---|
models.SDKError | 4XX, 5XX | */* |
Get Information on a specific device
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.devices.get_device_for_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43", device_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
user_id |
str | ✔️ | Which userID to list the devices of | ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
device_id |
str | ✔️ | Which device that belongs to the user to get | ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.GetDeviceForUserResponse
Error Type | Status Code | Content Type |
---|---|---|
models.SDKError | 4XX, 5XX | */* |
Disable a specific device
from moov import Moov
import os
s = Moov(
gateway_auth=os.getenv("MOOV_GATEWAY_AUTH", ""),
)
res = s.devices.disable_device_for_user(user_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43", device_id="ec7e1848-dc80-4ab0-8827-dd7fc0737b43")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
user_id |
str | ✔️ | Which userID to list the devices of | ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
device_id |
str | ✔️ | Which device that belongs to the user to get | ec7e1848-dc80-4ab0-8827-dd7fc0737b43 |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.DisableDeviceForUserResponse
Error Type | Status Code | Content Type |
---|---|---|
models.SDKError | 4XX, 5XX | */* |