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•10mo 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•10mo 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•10mo ago
thanks :widepeepoHappy1::widepeepoHappy2::widepeepoHappy3::widepeepoHappy4::widepeepoHappy5:

Did you find this page helpful?