Modify allowedUntilDate

Hey!
When Im trying to deactivate an user through api or just modify allowedUntilDate I constantly run into an error that this method is not allowed. Is there any other way to somehow deactivate a key code or set the end date back or anything through API call? I do not want to delete it just deactivate. (deactivation also run into the same problem)

deactivateAuthCode => HTTP 405, Body: <html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Method Not Allowed</p>
<p>The method specifie
1 Like

Hi Daniel,

How are you attempting to make these changes via the API? Are you using the smartlock/auth endpoint? You can see more information on that endpoint in our API documentation.

Let me know if this helps.

1 Like

Hi Andrew,

Thank you for your response and the clarification!

I’ve been attempting to use the PUT /smartlock/{smartlockId}/auth/{id} endpoint to update the allowedUntilDate field for an authorization code. Here’s the process I followed:
1. I retrieved the list of authorizations using the /smartlock/{smartlockId}/auth endpoint.
2. For specific users, I attempted to call the PUT /smartlock/{smartlockId}/auth/{id} endpoint to update their allowedUntilDate to the current date using the following payload:

{
  "id": "AUTH_ID",
  "allowedUntilDate": "2025-01-22T23:59:59Z"
}
  1. However, I received a 405 Method Not Allowed error in response.
1 Like

Hi Daniel,

In this case you should try a POST request to update an already existing auth. See SmartlockAuthResource_post_post for more details.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.