Hi,
I have been trying to deploy my website using netlify apis & came across an amazing blog -
How to Deploy a Basic Site Using Postman and the Netlify API
by @Jen Kagan. I followed it. But the apis are not working as expected.
The first api (https://api.netlify.com/api/v1/sites) works seamlessly, it creates new site and returns site_id.
The Second api (https://api.netlify.com/api/v1/sites/:siteid/deploys) returns proper response but sends
state:"new"
and not “uploading”. But I get a deploy Id
So if I try to hit the third API (https://api.netlify.com/api/v1/deploys/:deployid/files/index.html) it sends
{
"code": 401,
"message": "Access Denied: deploy must be in , not new"
}
{
"code": 401,
"message": "Access Denied: User does not have access"
}
I tried this several times and referred many discussion posts on this. But still struggling to resolve the issue. Please let me know if i am doing anything wrong. I have attached screenshots of the requests and responses from postman
Site name - relaxed-peony-ced135.netlify.app
Screen shots -