Is there anyway to get vapi used credits through a...
# support
r
I want to display the used credits of vapi for each user using my app like a progress bar, so is it possible to fetch that data ?
v
@Richard Absolutely! You can fetch the used credits data for each user by utilizing VAPI's API endpoints that provide usage information. You would need to make an authenticated request to the appropriate endpoint to retrieve the user's usage data. Once you have this data, you can display it in your app as a progress bar or in any other format that suits your needs. If you need detailed instructions on how to make the API call or if you require the specific endpoint information, please let me know, and I'll be happy to guide you through the process.
You can continue this conversation by mentioning me in the message.
r
can you tell me which endpoint it is ?
v
@Richard Please ask support for more info on this.
Got it. Tagging @User for additional help.
s
hit /call endpoints
and get all the credits which are used
would I have to loop through all the callIds for an agentId then show the cost ? wouldn't it be possible for me to just get the credits used just like in the dashboard just by hitting the get call api endpoint ?
s
yeah
you will need to get all the call id a
and then write the logic around it
although, ping me I will do a sql query and provide you the details
r
it's okay bro anyway I wanted to show the credits usage bar for each user in their dashboards so I was coding that part. Thanks for your help, I appreciate it !