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ā€¢8mo 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ā€¢8mo 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ā€¢8mo ago
thanks :widepeepoHappy1::widepeepoHappy2::widepeepoHappy3::widepeepoHappy4::widepeepoHappy5:

Did you find this page helpful?