1

I have a Wordpress CiviCRM site and want to try using the Attentive.ly Social Media Service. There is an Extension to connect to this service. I have installed the Civi Extension and all seems good. I created an account on the Attentive.ly site. I am in the process of connecting Civi to the Attentive.ly account and it asks for 3 items of information:

1) URL you use for your CiviCRM access - I have no problem 2) Site Key you use for your CiviCRM access - I have no problem 3) API Key you use for your CiviCRM access - I do not know how to find this?

How do I find or create the API Key?

If anyone has experience with Attentive.ly and can give some feedback that would be great.

  • Ron, Joe Murray should have a good answer to this question – Joe McLaughlin Feb 24 '16 at 21:24
  • I do not think the API Key extension which adds an API key to a contact is appropriate. The API key is at a higher level between Civi and the external system (Attentive.ly). Within the API extension created for this interface would be passed contact level information to update contacts. With another extension for a payment processor this is the case. The API key is provided by the external system and entered as a parameter in the extension setup. – Ron Gridley Feb 25 '16 at 13:30
  • I emailed and called (felt voice mail) Joe Murray yesterday, He has not yet responded. – Ron Gridley Feb 25 '16 at 14:17
  • Ron, see my answer below. Also, try reaching Joe Murray via IRC at irc.civicrm.org . – Joe McLaughlin Feb 25 '16 at 16:59
  • Thanks for directing Ron to me, @JoeMcLaughlin. Ron, I've emailed and voicemailed you back. Tag...you're it. ;) – Joe Murray Feb 25 '16 at 19:59
2

CiviCRM has multiple layers of security, all of which need to be handled properly to update its data remotely. You need to create a user which will be provided the permissions needed to update data in CiviCRM from Attentive.ly. This is part of the CiviCRM permissions model for using an external programmatic interface to interact with CiviCRM (see https://wiki.civicrm.org/confluence/display/CRMDOC/API+Security#APISecurity-PermissionswithinAPI for more details - that page is dated but I think generally accurate still). This approach to permissioning allows different external services to interact with different permissions, leverages the existing user/contact based permissioning system, and allows tracking of changes made by services to follow the paradigm set up for tracking which user makes changes to a contact.

@Andrei's suggestions are good ones. The official documentation for creating API user keys is at https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers . I've added updated instructions that do not require interacting directly with the database at How do I set up an API key for a user?

|improve this answer|||||
0

I can think of two options:

1) Use the extension Api Key, which will add an Api Key tab in the contact summary view wher you can create/edit/delete an Api Key.

2) The old fashion SQL way, assuming you have access to your server and mysql credentials:

UPDATE civicrm_contact SET api_key = "key" WHERE id = "your_contact_id";

Replace key with a strong alphanumeric string (32 characters), and your_contact_id with your CiviCRM contact id ie:

UPDATE civicrm_contact SET api_key = "SWb9Mpuudv262JdQ8Z65yh2ae2s23XXG" WHERE id = 123;

I haven't used Attentive.ly so I cannot give feedback on that.

|improve this answer|||||
  • I do not think the API Key extension which adds an API key to a contact is appropriate. The API key is at a higher level between Civi and the external system (Attentive.ly). Within the API extension created for this interface would be passed contact level information to update contacts. With another extension for a payment processor this is the case. The API key is provided by the external system and entered as a parameter in the extension setup. – Ron Gridley Feb 25 '16 at 13:31
-1

Ron, the API key you need is from Attentive.ly.

See https://github.com/JMAConsulting/biz.jmaconsulting.attentively - "Once you have been redirected to the Attentive.ly Sign Up page, either create a new account or login to your existing Attentive.ly account."

You can request an Attentive.ly demo here - https://attentive.ly/product/

|improve this answer|||||
  • Joe, Thanks for the list of Instructions from JMA. I also talked with Joe Murray (JMA) and got the same info. Creating the user and assigning an API Key to that user was fine. However, when enabling the Attentive.ly extension and being redirected to Attentive.ly I get an error. I login to Attentive.ley and get this error message; {"success":0,"parameters":[],"error":"invalid uri"}. It all stops there. From my Attentive.ly account I can try to connect to CiviCRM but that does not work either. I must be missing something else. – Ron Gridley Feb 26 '16 at 12:02
  • Ron, yeah so my answer is the incorrect one. – Joe McLaughlin Feb 26 '16 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.