Hey Vercel community! I’m building an open-source bot that generates and deploys v0 apps on Vercel directly from a text prompt—think of it like Grok generating responses, but for app creation. The bot automates simple app generation using v0’s capabilities, then deploys them via the Vercel API, retrieving the deployment URL to share (e.g., in comments or posts). I need some guidance on crafting the API payload for the /v13/deployments endpoint—specifically, how to structure the files field with v0-generated app files and ensure the deployment works smoothly to get the URL efficiently. Any examples or tips would be awesome! Happy to share more about the project or the repo if anyone’s curious. Thanks in advance!
Bot server running at http://localhost:3000
Error generating app: {
error: { code: 'forbidden', message: 'Not authorized', invalidToken: true }
}
Test failed: Request failed with status code 403
Did you know about these other v0 resources? A human should be here soon to help, but the answer may already be available even faster in one of these other posts.
This guide is a great place to start.
And these recordings can give you a look at v0 features and strategies in action: Topics tagged v0
I’m not sure what your existing setup setup steps and file structure is for this projects, but it sounds like the Build Output API may be part of what you’re asking for.
But the 403 error is because of a credential issue on the [Create a new deployment - Vercel API Docs](https://create a new deployment) request. The request should have both an Authorization header and either the teamId or slug query parameter matching the team that owns the project.
Please try again with the query param added and let me know how it goes
So I need ot find a way to give auth to the bot, and figure out if the bot can own the project or create a dashboard for the bot so every user that register into the bot for usage can own the project or something like that.
What you think it could be the best way to tackle this ?