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) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • REST API returning blank
Pages: [1]

Author Topic: REST API returning blank  (Read 1439 times)

simonium

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 2
REST API returning blank
February 06, 2012, 09:11:24 am
Hi there,

When I try to authenticate against the Rest Api of my civicrm installation, I try the following URL:

https://www.example.org/path/to/civi/codebase/civicrm/extern/rest.php?q=civicrm/login&name=user&pass=password&key=apikey

but I just get a white screen. I've checked the following is all the correct:

 - username is correct
 - password is correct
 - api key is set for user and is correct
 - site key is set
 - correct url to rest api

There must be something else I'm missing.  I've tried it with three combinations:

CiviCRM 3.4.8 + Joomla 1.5.25
CiviCRM 3.4.8 + Drupal 6.22
CiviCRM 4.08 + Joomla 1.7.3

Thanks in advance for any help!

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: REST API returning blank
February 06, 2012, 10:31:52 am
You have to use the site key rather than the API key to authenticate? Once you have authenticated the api key is returned.
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

simonium

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 2
Re: REST API returning blank
February 09, 2012, 07:40:29 am
Thanks for your help Erik. 

However, using the site key as I was supposed to still didn't help.  Actually, I found that despite doubling checking everything and making sure that I had everything right I still couldn't authenticate.  What I did find was that when I reverted back to version 3.4.5 / 4.0.5, everything started working perfectly again.  I hope this helps someone.

Simon.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: REST API returning blank
February 09, 2012, 07:58:24 am
Hi Simon,
could well be you have encountered a bug, what version where you using?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

simonium

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 2
Re: REST API returning blank
February 09, 2012, 08:02:21 am
Hi Erik,

I was using 3.4.8 / 4.0.8, though I tested it with .7 and .6 as well, and it only started working again with version 3.4.5 / 4.0.5. It could possibly be a bug, though I haven't heard of anyone else experiencing problems with the API on these versions.


Simon.

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: REST API returning blank
February 10, 2012, 07:34:35 am
It is possible no one else is running REST yet on these versions :-) I will raise a bug and do a little digging.....
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • REST API returning blank

This forum was archived on 2017-11-26.