-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages API (SMS) Authentication Failed. Check you're using a valid authentication method #289
Comments
Hi, the beta version you're using didn't fix this bug, I will probably yank that release. The purpose of it was to expose Video API functionality to developers who wanted early access, but it became out-of-date and has since been superseded by the release of v3.12.0. Things should work as expected with v3.12.0, please give that one a try! |
Hi @maxkahan , thanks for the reply. So using 3.12.0 doesn't work because I have a version conflict that seems to be resolved in v4.0.0b0. The error I get is:
We need the latest version of pydantic and other pydantic libraries (like pydantic-settings) require a later version of pydantic (2.*+ I think) Here are some more errors I got along the way: when downgrading to Vonage v 3.12.0: and when trying to run my application with the above, I get the issue: So, overall, if possible, I think upgrading pydantic to at least version 2.* should help. Would that be possible? |
I don't have permission to create a branch here but I made a few changes locally that seemed to enable my application to run properly @maxkahan (with a couple warnings). I'm not sure if there are additional changes needed to make sure this function for all users, or if there are tests that need to be updated. But it works for my needs so, the summary is:
I started a Draft pull request here: #290 |
Hi David, I started work to update the SDK to use Pydantic v2.x, but that required breaking changes so would have been rolled up into v4 of the SDK. I did some work on this on the |
Hi @dlewis2017 we've just released v3.13.0 with v2 support so that should solve this issue! |
Authentication failed. Check you're using a valid authentication method.
Expected Behavior
I expected to be able to initialize Client with application_id and private_key filepath and then send an SMS with messages API.
Current Behavior
I get the error mentioned above : vonage.errors.AuthenticationError: Authentication failed. Check you're using a valid authentication method.
Possible Solution
Seems the local _application_id isn't saving properly so when its checked for here it doesn't exist even though application_id does exist on client.
Steps to Reproduce (for bugs)
Follow tutorial
client = Client(application_id=application_id, private_key=private_key_file)
client.messages.send_message({ "channel": "sms", "message_type": "text", "text":body, "from":from_, "to":to })
Context
I am trying to follow along with the tutorials and send an SMS via Messages API but getting an authentication error. I've been able to receive messages using messages API webhooks and send messages with SMS API.
Your Environment
The text was updated successfully, but these errors were encountered: