How to implement OAuth 2 Circuit REST API for Bots? To use the client_id and client_secret. Thank you.
How to implement OAuth 2 Circuit REST API for Bots?
156 views Asked by rhys At
1
How to implement OAuth 2 Circuit REST API for Bots? To use the client_id and client_secret. Thank you.
See https://circuit.github.io/oauth.html#client_credentials on the HTTP request to get the token. You can manually perform the /oauth/token request to get a token, or use any OAuth 2.0 library. The perform regular HTTP GET/POST requests using this OAuth token.
Here is an example that uses simple-oauth2 to get the token and then node-fetch to get the conversations.