Skip to content

Account creation with account / token options is broken #175

@szaboat

Description

@szaboat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions