Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Get a list of hadiths" not working #253

Open
Thuliumitation opened this issue Mar 27, 2021 · 4 comments
Open

"Get a list of hadiths" not working #253

Thuliumitation opened this issue Mar 27, 2021 · 4 comments

Comments

@Thuliumitation
Copy link

Assalamualaikum. I am trying to get a hadith from Bukhari by using "https://api.sunnah.com/v1/hadiths?collection=bukhari&bookNumber=3&chapterId=23&hadithNumber=43" but it shows 403 Forbidden {
"message": "Missing Authentication Token"
} I tried using my token and also the default one too, but it doesn't work. Thank you

@ahadith
Copy link
Contributor

ahadith commented Mar 28, 2021

Wa`alaykum ussalam warahmatullah. It is a REST API, so the way you access it for your example is with the URL https://api.sunnah.com/v1/collections/bukhari/hadiths/43 while passing in the API key as a value for the header X-API-KEY.

@Thuliumitation
Copy link
Author

Waalaykum ussalam warahmatullah. It is a REST API, so the way you access it for your example is with the URL https://api.sunnah.com/v1/collections/bukhari/hadiths/43` while passing in the API key as a value for the header X-API-KEY.

Is there a way to specify the book and chapter number?

@ahadith
Copy link
Contributor

ahadith commented Mar 30, 2021

Once you specify the hadith number, there is no need to specify the book and chapter number. You can get a list of hadith in a book using this route: https://sunnah.api-docs.io/1.0/collections/get-the-list-of-hadith-of-a-book-for-a-collection

@nadahamdy217
Copy link

how can i get api key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants