I'm using the correct cart token and the variant ID. Can someone please suggest what might be causing this error? Additionally, if there are any alternative APIs or methods available to achieve the same result, I would greatly appreciate any suggestions.
Have you tried using the StorefrontAPI? The Admin API does not support operations on carts; it is meant more for managing products, collections, orders, and other back-office tasks. Cart management (i.e., adding, updating, and removing items from the cart) is a front-end operation and is typically handled by the Storefront API.