I think you mean "OAUTH" not "OATH". That might make your search for information easier.
Sorry, I don't know much about OAUTH and even less about Mastodon.
Welcome to the programming.dev Android development community!
The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License
I think you mean "OAUTH" not "OATH". That might make your search for information easier.
Sorry, I don't know much about OAUTH and even less about Mastodon.
I never developed anything for mastodon, but I searched "mastodon developer docs" and found a link for API specifications https://docs.joinmastodon.org/api/
There's a section for OAuth in there, hope this helps you.
UPDATE: It doesn't seem to need an API key, since the website never mentions it. Here's another doc to get started with their API: https://docs.joinmastodon.org/client/intro/