i want to know the username and password are correct using REST API.
JIRA Server
The way to do this is to try to log in. If the login works, they're good.
See https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/
It looks like you're new here. Sign in or register to get started.