Update README with information about how to create a key

Created on 20 April 2023, over 1 year ago
Updated 3 May 2023, over 1 year ago

Now that this module uses Key for managing the API key, the documentation needs to be updated to explain what kind of key is expected and how to create it.

The README still says "Configure your SendGrid API-Key in admin/config/services/sendgrid" which is incorrect if Key module is enabled.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @AaronBauman
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Here's what I've done:
    * Go to: /admin/config/system/keys
    * Click on "Add Key".
    * Fill in a "Key name" eg "Sendgrid API key".
    * Set the key type to "Authentication".
    * Set the key provider to "Configuration".
    * Paste the API key into the "Key value" field.
    * Click "Save".
    * Back in the Sendgrid admin page, select the new key as the "API secret key".

    Disclaimer: I haven't finished setting it up, but this seems like the right direction.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I finished setting this up last night and the steps above worked.

  • Assigned to DamienMcKenna
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I'll put this together as a formal docs update.

  • Status changed to Needs review over 1 year ago
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Here are the steps I used to make it work.

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    Thanks for the writeup, looks pretty good.

    My only bit of feedback is that Key module is optional, so the "Create a key definition using the Key module" step depends on whether that module is enabled.

    Otherwise, the admin/config/services/sendgrid settings are still applicable.

    See SendGridSettingsForm

        $key_exists = $this->moduleHandler->moduleExists('key');
    
        if ($key_exists) {
          $form['authentication']['sendgrid_integration_apikey'] = [
            '#type' => 'key_select',
            '#required' => TRUE,
            '#default_value' => $config->get('apikey'),
            '#title' => $this->t('API Secret Key'),
            '#description' => $this->t('The secret key of your key pair. These are only generated once by Sendgrid.'),
          ];
        }
        else {
          $form['authentication']['sendgrid_integration_apikey'] = [
            '#type' => 'password',
            '#required' => $requirenewkey,
            '#title' => $this->t('API Secret Key'),
            '#description' => $this->t('The secret key of your key pair. These are only generated once by Sendgrid. Your existing key is hidden. If you need to change this, provide a new key here.'),
          ];
        }
    
    
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    You know, I never noticed that, because I already had the Key module installed for something else X-)

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    How about this? I split up the installation into two pieces, depending upon whether the Key module is used.

  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

    Makes sense to me, thanks!

  • πŸ‡ΊπŸ‡ΈUnited States Perignon

    I'll get this merged in as soon as I can.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States Perignon

    Done! Thanks for the help!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024