Skip to content
CodeKruPro

Which OAuth 2.0 grant fits a CI job calling an API?

QuizMedium-HardAsked in: Accenture, Capgemini, Infosys

A nightly CI job (an automatic test run at night, with no human involved) must call a protected API as itself, not as any user. Which OAuth 2.0 grant fits? A grant is one way to get an access token.

  • Client credentials: the job sends its client id and secret to the token endpoint and receives an access token
  • Authorization code with PKCE
  • Resource owner password credentials (the app collects the user password and sends it to the token endpoint)
  • Implicit grant

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in