API Authentification

Does sapphire have a way to implement authentification to the api routes so that for, example, the api can only be accessed thru the bot dashboard?
Solution:
Sapphire Framework
Using the built in OAUTH2 route (backend) | Sapphire
If you are using localhost as your test environment, make sure you use http//localhost in
Jump to solution
3 Replies
kyra
kyraā€¢5mo ago
Yes, you have to define options.auth.id and options.auth.secret, and then in the route you'll be able to check for request.auth.
Solution
Favna
Favnaā€¢5mo ago
Sapphire Framework
Using the built in OAUTH2 route (backend) | Sapphire
If you are using localhost as your test environment, make sure you use http//localhost in
4ngelšŸ
4ngelšŸOPā€¢5mo ago
thanks :widepeepoHappy1::widepeepoHappy2::widepeepoHappy3::widepeepoHappy4::widepeepoHappy5:
Want results from more Discord servers?
Add your server