I can create an expense with the Splitwise API but cannot update nor delete that expense with the Splitwise API
LiuJoyceC opened this issue · 1 comments
I am able to successfully make a request to the create_expense
API to create a new expense in a group, and I can actually see the newly created expense when I look at the group on Splitwise. I note down the expense ID (I've tried from both the response body of the create_expense
request, as well as from the response of list_expenses
for that particular expense).
When I try to perform a nearly identical update_expense
request (where I just change one thing, for example I add a word to the "description" parameter), and I make sure I use the expense ID of the expense I had just created, I keep getting the error: "errorMessage": "updateExpense - updateExpense - Invalid API Request: you do not have permission to perform that action"
.
When I try to delete that same expense using the delete_expense
API, I keep getting the error: "errorMessage": "deleteExpense - deleteExpense - does not exist, or has already been deleted"
. However, it definitely has not been deleted, because I see the expense is still there when I check in the group on Splitwise. Also, when I make another list_expenses
request, that expense that supposedly "does not exist or has already been deleted" still is listed in the response (and the "deletedAt" and "deletedBy" fields are both null, indicating it is not deleted).
Why does the create_expense
API work just fine for me, but the create_expense
and delete_expense
on the expense I just created don't work?
Actually, never mind, I realized it's an issue with the SDK I was using to make these requests after diving into the source code of the SDK.