Deleting Access Codes
Learn how to delete your access codes, and ensure that the code is successfully removed from the device.
1. Delete the access code using the API
seam.access_codes.delete(
access_code_id="11111111-1111-1111-1111-555555555555"
)Nonetry:
seam.access_codes.get(
access_code_id="11111111-1111-1111-1111-555555555555"
)
except Exception as e:
print(e)SeamAPIException: status=404, request_id=4b1d2f1b-3988-4949-9279-fddef25dc9ae, metadata={'type': 'access_code_not_found', 'message': 'Could not find an access_code with device_id or access_code_id', 'data': {'access_code_id': '11111111-1111-1111-1111-555555555555'}, 'request_id': '4b1d2f1b-3988-4949-9279-fddef25dc9ae'}curl -X 'POST' \
'https://connect.getseam.com/access_codes/delete' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"access_code_id": "11111111-1111-1111-1111-555555555555"
}'{
"ok": true
}# Use GET or POST.
curl -X 'GET' \
'https://connect.getseam.com/access_codes/get' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"access_code_id": "11111111-1111-1111-1111-555555555555"
}'2. Verify that the access code has been removed
Last updated
Was this helpful?

