Answers.Body: <p>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 <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/API+Security#APISecurity-PermissionswithinAPI" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/API+Security#APISecurity-PermissionswithinAPI</a> 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.</p>
  
  <p>@Andrei's suggestions are good ones. The official documentation for creating API user keys is at <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers</a> . I've added updated instructions that do not require interacting directly with the database at <a href="https://civicrm.stackexchange.com/questions/9945/how-do-i-set-up-an-api-key-for-a-user/9946#9946">How do I set up an API key for a user?</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-25T19:58:01.260Z
Answers.LastActivityDate: 2016-02-25T19:58:01.260Z
Answers.LastEditDate: 2017-04-13T12:53:13.167Z
Answers.UserDisplayName: Joe Murray
Answers.Body: <p>I can think of two options:</p>
  
  <p><strong>1)</strong> Use the extension <a href="https://civicrm.org/extensions/api-key" rel="nofollow">Api Key</a>, which will add an Api Key tab in the contact summary view wher you can create/edit/delete an Api Key.</p>
  
  <p><strong>2)</strong> The old fashion SQL way, assuming you have access to your server and mysql credentials: </p>
  
  <pre><code>UPDATE civicrm_contact SET api_key = "key" WHERE id = "your_contact_id";
  </code></pre>
  
  <p>Replace <strong>key</strong> with a <strong>strong</strong> alphanumeric string (32 characters), and <strong>your_contact_id</strong> with your CiviCRM contact id ie: </p>
  
  <pre><code>UPDATE civicrm_contact SET api_key = "SWb9Mpuudv262JdQ8Z65yh2ae2s23XXG" WHERE id = 123;
  </code></pre>
  
  <p>I haven't used Attentive.ly so I cannot give feedback on that.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-25T13:31:46.370Z
Answers.Text: 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.
Answers.UserDisplayName: Ron Gridley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-24T13:14:44.630Z
Answers.LastActivityDate: 2016-02-24T13:14:44.630Z
Answers.UserDisplayName: Andrei
Answers.Body: <p>Ron, the API key you need is from Attentive.ly. </p>
  
  <p>See <a href="https://github.com/JMAConsulting/biz.jmaconsulting.attentively" rel="nofollow">https://github.com/JMAConsulting/biz.jmaconsulting.attentively</a> - "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." </p>
  
  <p>You can request an Attentive.ly demo here - <a href="https://attentive.ly/product/" rel="nofollow">https://attentive.ly/product/</a> </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-26T12:02:38.443Z
Answers.Text: 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.
Answers.UserDisplayName: Ron Gridley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-26T15:00:30.933Z
Answers.Text: Ron,  yeah so my answer is the incorrect one.
Answers.UserDisplayName: Joe McLaughlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-25T16:57:00.690Z
Answers.LastActivityDate: 2016-02-25T16:57:00.690Z
Answers.UserDisplayName: Joe McLaughlin
Body: <p>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:</p>
  
  <p>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?</p>
  
  <p>How do I find or create the API Key?</p>
  
  <p>If anyone has experience with Attentive.ly and can give some feedback that would be great.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-24T21:24:55.927Z
Comments.Text: Ron, Joe Murray should have a good answer to this question
Comments.UserDisplayName: Joe McLaughlin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-25T13:30:44.210Z
Comments.Text: 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.
Comments.UserDisplayName: Ron Gridley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-25T14:17:07.837Z
Comments.Text: I emailed and called (felt voice mail) Joe Murray yesterday,  He has not yet responded.
Comments.UserDisplayName: Ron Gridley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-25T16:59:48.803Z
Comments.Text: Ron, see my answer below. Also, try reaching Joe Murray via IRC at irc.civicrm.org .
Comments.UserDisplayName: Joe McLaughlin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-25T19:59:17.213Z
Comments.Text: Thanks for directing Ron to me, @JoeMcLaughlin. Ron, I've emailed and voicemailed you back. Tag...you're it. ;)
Comments.UserDisplayName: Joe Murray
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-02-26T15:03:35.683Z
Comments.Text: Joe Murray, thanks for steering Ron in the right direction.
Comments.UserDisplayName: Joe McLaughlin
Tags: <api><extension>
Title: How to connect to Attentive.ly (Social Media Service)?
ThreadText: # How to connect to Attentive.ly (Social Media Service)?
  
  (Asked by: username_0 on 2016-02-24)
  
  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.
  
  **Tags:** api, extension
  
  > **Comments:**
  > **username_1**: Ron, username_2 should have a good answer to this question  
  > **username_0**: 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.  
  > **username_0**: I emailed and called (felt voice mail) username_2 yesterday,  He has not yet responded.  
  > **username_1**: Ron, see my answer below. Also, try reaching username_2 via IRC at irc.civicrm.org .  
  > **username_2**: Thanks for directing Ron to me, @JoeMcLaughlin. Ron, I've emailed and voicemailed you back. Tag...you're it. ;)  
  > **username_1**: username_2, thanks for steering Ron in the right direction.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2016-02-25. Score: 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.
  
  @username_3'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?](https://civicrm.stackexchange.com/questions/9945/how-do-i-set-up-an-api-key-for-a-user/9946#9946)
  
  
  ---
  
  ### Answer by username_3 on 2016-02-24. Score: 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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_1 on 2016-02-25. Score: -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/>
  
  > **Comments:**
  > **username_0**: Joe, Thanks for the list of Instructions from JMA.  I also talked with username_2 (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.  
  > **username_1**: Ron,  yeah so my answer is the incorrect one.  
  
  ---
  
  