Site icon Hip-Hop Website Design and Development

I changed my domain name and rest api stopped working

I’am building a word-press website, and I have changed my domain name from websiteold.com to websitenew.com

The domain transfer was done by the webserver host.

However, I’am not able to use the rest API since i changed to the new domain name. This is the error I’am getting from postman.

{
"status": "error",
"error": "UNAUTHORIZED",
"error_description": "Sorry, you are not allowed to access REST API."
}

I have generated a new API key using the application passwords plugin, however whether i use the generated API key or a random/false API key, i get the same response.

Any suggestions as to why this is happening.
It might have to do with configurations being associated with old domain name. Please advise what to do.