Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Ansible Tower API OAuth Tokens

    Posted on

    https://docs.ansible.com/ansible-tower/latest/html/administration/oauth2_token_auth.html?extIdCarryOver=true&sc_cid=701f2000001OH7YAAW

    9.3.1. Application using authorization code grant type

    This document seems to be what I am looking for, but there is missing information. I need help to get moving in the right direction. I have already setup an Application in Tower using Authorization Code grant type. I have my client_id and client_secret.

    I need to issue a GET against the authorize endpoint, providing the response_type (token), client_id (I have), redirect_urls, and scope (read)

    example:

    curl -X GET -d "response_type=token&client_id=XXXXX&scope=read&redirect_urls=https://mytower/api/v2" https://mytower/api/o/authorize

    When I do this, I only get a 301 Moved Permanently response.

    What am I doing wrong? Ultimately, I need to open up API access to an external application that is not associated with any particular user ID. I need this external application to be able to interact with Ansible Tower to start Jobs, passing parameters through Extra Vars.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat, Inc.