Create Constituent API call - errors and questions

Options

I've been working with the API trying to use the create user function but am receiving an error regarding Certificate verify location

I've used the code http://open.convio.com/api/constituent-api/server/code/createusersamplecode.txt

https://secure2.convio.net/acscan/site/SRConsAPI. ERROR: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none

Question:

1) I'm trying to create a simple form wherein users submit a story with their name/email. I also want to add them to the Convio as a constituent. Is a user name /password required for creating constituents? It seems so based on the sample code but is this really the case?

2) Is the username/pw causing the certificate verify location to fail? I don't see the parameters to set this path.

Thanks in advance or the help.

Tagged:

Comments

  • From personal experience, add in:

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

  • Daniel Laender:

    From personal experience, add in:

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    Thank you - that line got rid of the authentication error I was getting.

    My xml_response now reads:

    Found

    The document has moved here.

    here links to the XML error response:

    <errorResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd">

    <code>2</code>

    <message>Incorrect API key ".</message>

    </errorResponse>

    My API key is correct - any ideas why I'm getting this error?

  • Josh Bowes:

    Thank you - that line got rid of the authentication error I was getting.

    My xml_response now reads:

    Found

    The document has moved here.

    here links to the XML error response:

    <errorResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd">

    <code>2</code>

    <message>Incorrect API key ".</message>

    </errorResponse>

    My API key is correct - any ideas why I'm getting this error?

    I see this a lot when people call the API on an insecure URL rather than secure. What happens in that case is that the Convio server automatically redirects you, but the act of redirecting strips all the POST arguments out.

    The other thing that I see a lot is typos in parameter names. All the parameter names are case-sensitive and must be provided exactly as documented.

    FYI, checking for a valid api_key is the very first thing that all of the APIs do.

Categories