Developers

Mostly about Wild Apricot API. Feel free to share examples of your code!

  1. API V2 authorization "invalid_client" error

    Hi, I'm trying to do v2 authorization (from Java), and getting an invalid client error.

    My setup reads (edited for brevity):

    HttpPost post = new HttpPost(AUTH_URL+"/auth/token");

    post.addHeader("Content-Type","application/x-www-form-urlencoded");

    post.addHeader("Authentication","Basic "+Base64.encodeBase64String("APIKEY:"+API_KEY));

    List <NameValuePair> nvps = new ArrayList <NameValuePair>();

    nvps.add(new BasicNameValuePair("grant_type", "client_credentials"));

    nvps.add(new BasicNameValuePair("scope", "account"));

    post.setEntity(new UrlEncodedFormEntity(nvps));This seems a perfect mirror of the php and c# samples, but in return, I'm getting the remarkably useful:{"error":"invalid_client","error_description":null,"error_uri":null} Any ideas?Thanks,GeePawHill

    0 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
  2. API PUT produces unexpected result

    As part of our first operational use of the API, I need to update two fields dynamically. For trials, I am using php cUrl, modeled on your sample application. I have no problems with GET, but PUT leaves me baffled.

    Each time I run the script, the target fields are not changed - but the membership of the target contact goes from "active" to "membership not allocated".

    Clearly my code is doing this: but how/why? Can anyone give me a clue as to what is happening?

    Also, my debugging script shows a result JSON containing all the target contact's data.…

    0 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    6 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
  3. API Help

    I’ve been following your API v2 guides and snagged the PHP sample listed here:

    https://github.com/WildApricot/ApiSamples/blob/master/PHP/sampleApplication.php

    I was able to properly implement the getAccountDetails function and I created a getContactIdFromEmail function that tweaked the getContactsList function to filter on an email address.

    Now I’m trying to update the FirstName of the Contact that I received. Here’s the code:

    function updatePasswordByContactId($contactId, $email)

    {

    global $waApiClient;

    global $accountUrl;

    $url = $accountUrl . "/Contacts/Contact/{$contactId}";

    $data = array("FirstName" => "Chaz2");

    $result = $waApiClient->makeRequest($url, "PUT", $data);

    return true;

    }

    I analyzed the CURL parameters to see that it is calling the URL:

    https://api.wildapricot.org/v2/Accounts/73659/Contacts/Contact/25710546 ALID_CONTACT_ID

    In a…

    0 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
  4. Google Script for Google Apps

    Thank you to WildApricot for posting the sample code for an api connection to update a google spreadsheet. https://help.wildapricot.com/display/DOC/Sample+API+V2+applications

    I'm now using google scripts to produce (update) 13 regional spreadsheets of members each that has been shared with a regional coordinator so that I don't have to do this manually.

    Would love to hear how other organizations are using Google apps and integrating the wa api.

    Also would love to collaborate on building some additional Google Code scripts. Example, allowing each regional coordinator to email (mail merge) via gmail the members in their regional spreadsheet.

    I am also interested in…

    2 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    12 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
  5. Access to image fields through the API

    Please add access to the image fields through the API - I would like to be able to get the URL of the image the member uploaded.

    11 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    14 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
  6. Pass authorization credentials via url

    We use a separate web server but manage user registration through wildapricot. If the user logs into the primary website, can I pass these credentials to wildapricot in the URL? I don't want them to have to log on a second time when they connect.

    Thanks - Mike

    0 votes
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Flag idea as inappropriate…  ·  Admin →
  7. What will you do with the new API?

    I'm excited for the API that will be coming out this month (according to this forum: http://forums.wildapricot.com/forums/308920-archive/suggestions/8831320-api-to-read-contact-member-records-2469 )

    I see that there are a lot of people interested in the API and I was curious what others will be using it for? I will be using it to integrate Google Maps but perhaps there are some other cool things I can set up that I haven't thought of.

    1 vote
    Sign in
    (thinking…)
    Sign in with: Facebook Google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    21 comments  ·  API  ·  Flag idea as inappropriate…  ·  Admin →
1 2 3 5 Next →
  • Don't see your idea?

Developers

Categories

Feedback and Knowledge Base