Skip to content

Connecting with Basic Auth

Robert Brodie edited this page Apr 27, 2024 · 1 revision

Creating Your API Token

A simple method to connect the gem to your Jira instance is to create an API token.

  1. In Jira, click your avatar in the top right corner and choose Manage account
  2. On the Profile and visibility screen, navigate to the Security tab
  3. Under the API tokens heading, choose Create and manage API tokens
  4. Click the Create API token button
  5. Enter a label to name your token
  6. Click the Create button
  7. Copy the token presented in the Your new API token modal and store securely

Configuring Your Client

options = {
  username: '<Email address of the user the token was created against>',
  password: '<API token>',
  site: 'https://<subdomain>.atlassian.net/',
  context_path: '',
  auth_type: :basic
}

client = JIRA::Client.new(options)
Clone this wiki locally