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) »
  • Re: REST API Library... can't login
Pages: [1]

Author Topic: Re: REST API Library... can't login  (Read 984 times)

hesco

  • Guest
Re: REST API Library... can't login
September 07, 2010, 08:07:57 pm
For the next person who stumbles by,

In my quick perusal, I was unable to determine how the civicrm_contact tables is related to the drpl_users table.  However, this query, applied to the appropriate user (discerned by other means), changed the error message, even if it did not get me to the promised land, with a return from my RESTful call.

UPDATE civicrm_contact SET api_key = 'IRXhtxdFoYqy32Eng6VDWWAsWsDFXJk1' WHERE id = '240';

Now this:

http://example.com/sites/all/modules/civicrm/extern/rest.php?q=civicrm/user/login&key=our_key&api_key=our_api_key&name=hesco&pass=my_password

gets me:

<ResultSet>
<Result>
<error_message>Unknown function invocation.</error_message>
<is_error>1</is_error>
</Result>
</ResultSet>

I've also tried ?function=
and
civicrm/user/login
civicrm/login
user/login
login

Not sure what to try next . . .

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: REST API Library... can't login
September 07, 2010, 10:41:17 pm
Hi,

I would suggest you to start with the chapter in the book, the first example on the rest api will solve your problem now, and it will save you a lot of time.

http://en.flossmanuals.net/CiviCRM/DevelopAPI
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Re: REST API Library... can't login

This forum was archived on 2017-11-26.