Jump to content

rekkajay

Clients
  • Posts

    11
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by rekkajay

  1. I am finishing setup on a community for people who have only ever used Facebook Groups as their community platform. They have NO idea where to begin with a forum. Are there any existing documents for the Invision forum platform for people who only need to know how to use the front end? Everything I've found so far seems focused on the AdminCP. Thank you!
  2. When our customers sign up, they fill out a form with information our moderators need to fulfill their orders, but that information only seems accessible via the admin>nexus>customers>[customer]>Customer Information tab. The custom fields that output with the /nexus/purchases/ GET do not include these fields, but there does not seem to be a way to GET something like /nexus/customer/ according to your documentation. How can I GET this information from the system? Thanks!
  3. Here's the scenario I'm trying to automate for our forums. We regularly have courses that run overlapped but are separated into different client groups based on the course start dates. Each course start date needs a product and a group and I want to write an API Rest script that would take care of everything for us. An HTML form creates a DB record of a dated course that needs to be set up in the forums. A script triggered by cron 1xday iterates through tasks to be completed for each course recorded: It's the (endpoints: ??) that I'm stuck on. I don't see listings in the API documentation for products at all, or a way to POST /core/groups Is there an endpoint for products (something like /nexus/products) and if so, a way to POST to create a new product? Is is possible to POST to /core/groups to create a new group?
  4. Here's the scenario I'm trying to automate for our forums. We regularly have courses that run overlapped but are separated into different client groups based on the course start dates. Each course start date needs a product and a group and I want to write an API Rest script that would take care of everything for us. An HTML form creates a DB record of a dated course that needs to be set up in the forums. A script triggered by cron 1xday iterates through tasks to be completed for each course recorded: It's the (endpoints: ??) that I'm stuck on. I don't see listings in the API documentation for products at all, or a way to POST /core/groups Is there an endpoint for products (something like /nexus/products) and if so, a way to POST and create a new product? Is is possible to POST to /core/groups and create a new group?
  5. I believe that's only for oAuth, correct? I'm using API Keys. According to the documentation, "using an API key, all data is available and all actions can be performed." The API key was set to have all Endpoint permissions via System > Rest & OAuth.
  6. In frustration, I went back to the original call using the sample in Invision's API documentation that I originally had, last week when /nexus/invoices was returning information. $url = $communityUrl . "api" . $endpoint; $curl = curl_init( $url ); curl_setopt_array( $curl, array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_USERPWD => "{$apiKey}:", CURLOPT_USERAGENT => "MyUserAgent/1.0" ) ); $response = curl_exec( $curl ); print_r($response); I went through the entire list of endpoints in the API documentation linked above, and the ONLY ones that return a 500 error are /nexus/invoices and /nexus/transactions. /nexus/purchases DOES work, which in theory would contain the same strings as in invoices and transactions. Does this help anyone pinpoint my issue? I'm banging my head against my desk, here, and I appreciate any help!
  7. The 500 error appears to be coming from the forum, not from my own server (it's a formatted 500 error block rather than the plain text Internal Server Error message my server displays), and nothing is logged in my server's access logs. The API logs in my adminCP only show successful 200 OK connections, no failures. /core/hello will output, but /nexus/invoices and /nexus/transactions won't.
  8. I saw a character replacement snippet on Stack Overflow and tried that, but no luck. That code is below: $curl = curl_init( $url ); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_USERPWD => "{$apiKey}:", CURLOPT_USERAGENT => "MyUserAgent/1.0" )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); // Stack Overflow character fix snippet START $checkLogin = $response; // This will remove unwanted characters. // Check http://www.php.net/chr for details for ($i = 0; $i <= 31; ++$i) { $checkLogin = str_replace(chr($i), "", $checkLogin); } $checkLogin = str_replace(chr(127), "", $checkLogin); // This is the most common part // Some file begins with 'efbbbf' to mark the beginning of the file. (binary level) // here we detect it and we remove it from the first 3 characters if (0 === strpos(bin2hex($checkLogin), 'efbbbf')) { $checkLogin = substr($checkLogin, 3); } $checkLogin = json_decode( $checkLogin ); print_r($checkLogin); // Stack Overflow character fix snippet END $response = json_decode($checkLogin, true); switch (json_last_error()) { case JSON_ERROR_NONE: echo ' - No errors'; break; case JSON_ERROR_DEPTH: echo ' - Maximum stack depth exceeded'; break; case JSON_ERROR_STATE_MISMATCH: echo ' - Underflow or the modes mismatch'; break; case JSON_ERROR_CTRL_CHAR: echo ' - Unexpected control character found'; break; case JSON_ERROR_SYNTAX: echo ' - Syntax error, malformed JSON'; break; case JSON_ERROR_UTF8: echo ' - Malformed UTF-8 characters, possibly incorrectly encoded'; break; default: echo ' - Unknown error'; break; } echo PHP_EOL; if ($response !== null) { echo $response->purchases->canceled; } else { echo "Unknown"; }
  9. As far as I know, nothing. I stopped working on it and had the array output printing on the page. I planned to come back and code the report the way I wanted it, but now I'm getting a 500 error. Support keeps telling me they won't help with custom code so I'm trying to get eyes on it to see if it is my mistake as they suggest, but I haven't touched a thing so I don't see how the error is on my side. The API logs show 200 OKs on the call, but I keep getting JSON_ERROR_SYNTAX no matter what I do.
  10. I am trying to follow the instructions on https://invisioncommunity.com/developers/rest-api for pulling in data from our forum. Where last week I was able to print the data from the resulting $response, today the call for /nexus/invoices is returning "JSON_ERROR_SYNTAX" so nothing is being output. $curl = curl_init( $url ); curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPAUTH => CURLAUTH_BASIC, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_USERPWD => "{$apiKey}:", CURLOPT_USERAGENT => "MyUserAgent/1.0" )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); $response = json_decode($response, true); switch (json_last_error()) { case JSON_ERROR_NONE: echo ' - No errors'; break; case JSON_ERROR_DEPTH: echo ' - Maximum stack depth exceeded'; break; case JSON_ERROR_STATE_MISMATCH: echo ' - Underflow or the modes mismatch'; break; case JSON_ERROR_CTRL_CHAR: echo ' - Unexpected control character found'; break; case JSON_ERROR_SYNTAX: echo ' - Syntax error, malformed JSON'; break; case JSON_ERROR_UTF8: echo ' - Malformed UTF-8 characters, possibly incorrectly encoded'; break; default: echo ' - Unknown error'; break; } echo PHP_EOL; if ($response !== null) { echo $response->purchases->canceled; } else { echo "Unknown"; } This returns - Syntax error, malformed JSON Unknown ("Unknown" being from that last bit of the code) Any help to kick me off here would be appreciated. I wasted a full day on this when I should have been formatting the resulting data into a useable report.
  11. Using REST plus cron jobs, or any other method, how do I send an email notice to administrators (or a user group) when a renewing product (not a subscription) is canceled by a customer? We provide ongoing services for our customers and want to know when they've decided not to renew. Thanks in advance!
×
×
  • Create New...