CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Standalone API Help
Pages: [1]

Author Topic: Standalone API Help  (Read 828 times)

jrburcher

  • Guest
Standalone API Help
April 25, 2010, 05:57:02 pm
Hi,

First of all, huge fan of CiviCRM, this system is amazing!

I have been trying to get the REST API interface working, but have run into a few issues.  I have been using the documentation from:-
http://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface

I have now reset the following lines of code:-
        CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_Contact', $result[CRM:0], 'api_key', sha1($result[CRM:2]) );
        $api_key = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $result[CRM:0], 'api_key');
        // return self::error("This user does not have a valid API key in the database, and therefore cannot authenticate through this interface");

However the next step is and then login each API user account once before restoring the commenting of these lines to their original state.

I am missing something because I don't actually know what the API users are.  I have always used my myopenid (from myopenid.com) to login to the system.

I know that the site key is working as expected.  If anyone could give me some guidance I would really appreciate it.

Thank you so much :)

jrburcher

  • Guest
Re: Standalone API Help
April 25, 2010, 05:57:37 pm
I am also aware that standalone support will not exist in 3.2, that is not an issue :)

jrburcher

  • Guest
Re: Standalone API Help
April 25, 2010, 06:28:23 pm
For anyone else trying to get this working, I found that if you set the api_key manually through phpmyadmin / webmin / whatever the code then becomes:-
http://domain/extern/rest.php?q=civicrm/contact/search&key=[key]&api_key=[key]

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Standalone API Help

This forum was archived on 2017-11-26.