Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

users.totp(user_id) Returns 405 Method Not Allowed #91

Open
samj-dev opened this issue Feb 5, 2025 · 0 comments
Open

users.totp(user_id) Returns 405 Method Not Allowed #91

samj-dev opened this issue Feb 5, 2025 · 0 comments

Comments

@samj-dev
Copy link

samj-dev commented Feb 5, 2025

📝 Description

I am trying to enable TOTP for a user using the Clerk Python SDK by calling users.totp(user_id), but it results in a 405 Method Not Allowed error.

🔄 Steps to Reproduce

  1. Use the Clerk Python SDK to enable TOTP for a user:

    from clerk import Clerk
    
     with Clerk(
            bearer_auth="<API_KEY>",
    ) as clerk:
        response = clerk.users.create_totp(user_id="<USER_ID>")
        print(response)
  2. The request fails with the following error:

       405

✅ Expected Behavior

  • The SDK should successfully enable TOTP for the user or return a meaningful error message if TOTP is not available.

❌ Actual Behavior

  • The SDK returns a 405 Method Not Allowed error.
  • Also based on Clerk API Reference https://clerk.com/docs/reference/backend-api/tag/Users there is no such method

❓ Questions

  • Is the users.totp(user_id) method correctly implemented in the SDK?
  • Is this API endpoint (POST /v1/users/{user_id}/totp) still supported?
  • If not, what is the correct way to enable TOTP using the Clerk SDK?

🛠 Environment

  • Clerk Python SDK Version: 1.7.2
  • Python Version: 3.11
  • Operating System: Ubuntu 22.04,

Would appreciate any clarification or fixes! 🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant