Hi Sagar,
In the "Authorization" header are you actually base64 endcoding the client id and secret and sending the encoded string?
For instance if I have the following client id = "Jim" and secret = "Crespino". If I base64 encode "Jim:Crespino", then I get the string "SmltOkNyZXNwaW5v". Then my Authorization header value should be "Basic SmltOkNyZXNwaW5v".
Most programming languages have libraries that will perform a base64 encode routine. If you need to do it manually then there are many online tools, such as this one: https://www.base64encode.org/
Note, base64 encoding is not encrypting. You can easily decode any encoded string, so please continue to protect the client id and secret, as they are essentially a username and password to your org with authorization to perform any API request granted by the permissions of the role assigned to that OAuth client.
By the way, you might consider posting development related questions into the Genesys Cloud Developer Forum at https://developer.genesys.cloud/forum.
Cheers,
------------------------------
Jim Crespino
Senior Director, Developer Evangelism
Genesys
https://developer.genesys.com------------------------------