API working on master server but the same Client ID not working on the test server

API working on master server but the same Client ID not working on the test server

My problem is, that I am developing on test server, and I need to get Access token via API.
My code working on the real server, but on the test server after OAuth login, when I call Acces Token API it returns: '{"error":"invalid_client"}'

Why the same Clinet ID working on real server and not working on test server?