Skip to content
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

Account creation with account / token options is broken #175

Open
szaboat opened this issue Nov 10, 2022 · 0 comments
Open

Account creation with account / token options is broken #175

szaboat opened this issue Nov 10, 2022 · 0 comments
Labels

Comments

@szaboat
Copy link

szaboat commented Nov 10, 2022

Creating subaccounts with account and token options does not work.

ExTwilio.Account.create(%{friendlyName: "Subaccount name"}, [account: ACCOUNT_SID, token: TOKEN])
{:error,
 %{
   "code" => 20404,
   "message" => "The requested resource /2010-04-01/Accounts/ACCOUNT_SID/Accounts.json was not found",
   "more_info" => "https://www.twilio.com/docs/errors/20404",
   "status" => 404
 }, 404}

The create endpoint for accounts is /2010-04-01/Accounts.json

When the account parameter is passed to the create call it makes a POST request to the POST /2010-04-01/Accounts/$ACCOUNT_SID/Accounts.json URL.

The expectation would be is to hit the /2010-04-01/Accounts.json URL with the right credentials and not the ACCOUNT_SID specific URL.

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

No branches or pull requests

2 participants