# What is the best way to Authorize api requests for fetching system logs

**URL:** <https://devforum.okta.com/t/what-is-the-best-way-to-authorize-api-requests-for-fetching-system-logs/24635>\
**Category:** API\
**Created:** [June 21, 2023, 7:06pm UTC](https://devforum.okta.com/t/what-is-the-best-way-to-authorize-api-requests-for-fetching-system-logs/24635 "2023-06-21T19:06:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkpdev](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@mkpdev](https://devforum.okta.com/u/mkpdev)\
**Post date:** [June 21, 2023, 7:07pm UTC](https://devforum.okta.com/t/what-is-the-best-way-to-authorize-api-requests-for-fetching-system-logs/24635/1 "2023-06-21T19:07:00Z")

</div>

I am working on a use case to fetch system logs from the Okta API’s. The application which will be pulling logs from okta api is a native backend application.

I need some guidance here to decide which one out the below is considered as the best approach to do that :

a. Use the SSWS token with read only “Report Administrator” role.  
b. Use Implement OAuth for Okta with a service app as explained here [https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/main/\*use-the-client-credentials-grant-flow](https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/main/*use-the-client-credentials-grant-flow)

Please advise which is the best and preferred way ?

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [June 22, 2023, 10:34pm UTC](https://devforum.okta.com/t/what-is-the-best-way-to-authorize-api-requests-for-fetching-system-logs/24635/2 "2023-06-22T22:34:28Z")

</div>

@mkpdev! Thank you for your question. The answer is b! As this method is the secure route/choice for a service automation app. You can learn more about why this is so here - [Selecting the Best Authorization for Your API Integrations | Okta Developer](https://developer.okta.com/blog/2023/04/24/api-integrations). I suggest you enable the scope [okta.logs.read](https://developer.okta.com/docs/api/oauth2/) to allow your service app to read System Log entries in your Okta org.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 15, 2024, 6:02pm UTC](https://devforum.okta.com/t/what-is-the-best-way-to-authorize-api-requests-for-fetching-system-logs/24635/3 "2024-02-15T18:02:19Z")

</div>


