This sounds like you a client id and a client secret and tried to use the client secret as a token.
A client secret is not a token
Please refer to the authentication documentation to determine which kind of token you need and then generate said token