Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13304

Generate User API Key from CiviCRM Interface

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: Unscheduled
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      It is inconvenient to not be able to use the REST interface until you hunt and find the documentation (http://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface) to tell you to manually insert an api_key in your database to use it. Further, this prevents semi- (or full) self-service use of CiviCRM's REST api.

      I couldn't find anything that generates a key in civicrm already, but something like this should be unique enough:

      <?php

      $api_key = sha1(mt_rand().$contactId.$contactName);

      ?>

      As well as a field or even a field+button pair in the "Edit Contact" view.

        Attachments

          Activity

            People

            • Assignee:
              nganivet Nicolas Ganivet
              Reporter:
              wrought Wrought
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: