-
REST API create message problem
Perfect, that did the trick. Thanks a million 🙂
-
REST API create message problem
Would you (or a colleague of yours) be able to provide a CURL command line that generates a message? I have spent a lot of time now with trying to get the "to" parameter accepted by the IPS REST API, but without any success at all. This is how it should work, according to your documentation: curl --location "https://xxx/api/core/messages/?key=xxx" --header "Content-Type: multipart/form-data" --header "Host: xxx" --header "accept: */*" --form "from=4" --form "to=[2]" --form "title=test title" --form "body=test body" But all I get back is this: { "errorCode": "1C374\/3", "errorMessage": "INVALID_RECIPIENT" } This is the REST API log in the ACP for the above request: POST core/messages/ Request Data { "key": "xxx", "from": "4", "to": "[2]", "title": "test title", "body": "test body" } Response { "errorCode": "1C374\/3", "errorMessage": "INVALID_RECIPIENT" }
-
REST API create message problem
Using Postman and also passing all parameters within the URL doesn't change the outcome, even without escaping the [ ] curl --location --globoff --request POST 'https://xxx/api/core/messages/?key=xxx&from=4&body=Ich%20bin%20ein%20Body&title=Ich%20bin%20ein%20Subject&to=[2]' --header 'Cookie: PHPSESSID=0s52vp09q9qdffb2ahi83adq4c; ips4_IPSSessionFront=84gk38i1l4cra3jn48kljjevol; ips4_clearAutosave=newContentItem-forums%2Fforums-147'
-
REST API create message problem
This is what Postman creates as CURL command line curl --location 'https://xxx/api/core/messages/?key=xxx' \ --header 'Cookie: PHPSESSID=0s52vp09q9qdffb2ahi83adq4c; ips4_IPSSessionFront=84gk38i1l4cra3jn48kljjevol; ips4_clearAutosave=newContentItem-forums%2Fforums-147' \ --form 'from="4"' \ --form 'to="[2]"' \ --form 'title="test title"' \ --form 'body="test body"' or as PHP code <?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://xxx/api/core/messages/?key=xxx', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array('from' => '4','to' => '[2]','title' => 'test title','body' => 'test body'), CURLOPT_HTTPHEADER => array( 'Cookie: PHPSESSID=0s52vp09q9qdffb2ahi83adq4c; ips4_IPSSessionFront=84gk38i1l4cra3jn48kljjevol; ips4_clearAutosave=newContentItem-forums%2Fforums-147' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; Is the problem maybe that Postman paases the parameter as strings, enclosed in ' ' ? For the from parameter, and all the other apis I have already used that always worked. In my application I use a wrapper around CURL which creates this request (with all parameters in the url) which also fails with the same error: ~POST /api/core/messages/?body=Ich%20bin%20ein%20Body&from=4&title=Ich%20bin%20ein%20Subject&to=%5B2%5D HTTP/2 ~Host: xxx ~authorization: Basic xxx ~accept: */* ~content-type: multipart/form-data ~user-agent: SwyxIPSIntegration/1.0.0 ~content-length: 0
-
-
REST API create message problem
Hi, I am currently trying to create a message using the https://invisioncommunity.com/developers/rest-api?endpoint=core/messages/POSTindex api. The "to" parameter is stated to be of type "array". I only need to pass one recipient there, but regardles of how I format the paramater (when testing the api in Postman), I always get "errorCode": "1C374/3", "errorMessage": "INVALID_RECIPIENT" back. I tried to give the user id just as number 2, or as json formated array [2], or a string in json formated array ["2"]. Nothing seems to work. Am I doing something obvious wrong or is there a problem with this api parameter? The documentation say, that "1C374/3" means that the paramater haven't been given at all. Creating forum topic, posts, download comments a.s.o. works fine via the api, I just struggle with sending messages. Regards, Tom.
-
[CJ] Downloads Plus (Support Topic)
Hi @CodingJungle, did you have any chance to work on that promised update?
-
-
404 Management - Supporttopic
Thanks a lot for the quick update!!!
-
-
IPS 4.7.2 final major problem
Thanks a lot for the patch!!!
-
IPS 4.7.2 final major problem
Thanks for your reply. I already did 🙂
-
IPS 4.7.2 final major problem
And how would I do that when being on an IPS hosted plan? I don't see any such functionality in the ACP. BTW: with the update I have lost all downloads (using "Downloads Plus") from my site, which is a major part of it. I have contacted the author, but who knows when or if there will be an update. Without any warning one would never ever expect such system changes in a minor update.
-
-
-
-
404 Management - Supporttopic
With the update to 4.7.2 this plugin got automatically deactivated (it is stated to by incompatible with the PHP 8). @Fosters Are we getting an update for it, so it will work again in 4.7.2?
-
[CJ] Downloads Plus (Support Topic)
I just updated to 4.7.2 and it seems that Downloads Plus is not compatible. It got automatically deactivated, rendering all downloads on my page inaccessible at the moment. @CodingJungle Are we getting an update for Downloads Plus to get it working again?
-
-
Syntax highlighting default in code blocks
Hi, have you ever figured how to extend the list of supported languages?
-
Setting up page forwardings
Hi Daniel, with those addins the management of the forwarding looks even more comfortable. Thanks!
-
Setting up page forwardings
Thank for that link, didn't find it in my own search. That seems to be a proper way forward.