Hi guys,
I have started with Mautic in few days ago using a localhost test server (apache2).
So, i’m trying integrate it with my current platform using REST API.
Every call to consume any endpoint results in a 404 return. The API is using OAuth1 and was succesfully autenticated.
On example bellow i’m trying create a new contact. (i tried get, getList, and others endpoints too… all with same result 404)
DebugInfo:
'flow' =>
array (
'01-09 20:06:33' =>
array (
0 => 'validateAccessToken()',
1 => 'has access token',
2 => 'makeRequest(http://localhost/mautic/index.php/api/contacts/new, firstname=Jim&lastname=Contact&email=jim%40his-site.com&ipAddress=192.168.0.1, POST,...)',
3 => 'making request using OAuth1.0a spec',
4 => 'Posted parameters = firstname=Jim&lastname=Contact&email=jim%40his-site.com&ipAddress=192.168.0.1',
),
),
'basestring' => 'POST&http%3A%2F%2Flocalhost%2Fmautic%2Findex.php%2Fapi%2Fcontacts%2Fnew&email%3Djim%2540his-site.com%26firstname%3DJim%26ipAddress%3D192.168.0.1%26lastname%3DContact%26oauth_consumer_key%3Dro3dbmru7v4c80wwg08cw4okggkc4ocsgscw0gwockc0000wo%26oauth_nonce%3D3e4c79219e1491fc%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1483992393%26oauth_token%3D1srqh05ega5ccw4kk8w04w44kwccw88gcgo8s8oo8ggo8o4go0%26oauth_version%3D1.0',
'headers' =>
array (
'oauth_consumer_key' => 'ro3dbmru7v4c80wwg08cw4okggkc4ocsgscw0gwockc0000wo',
'oauth_nonce' => '3e4c79219e1491fc',
'oauth_signature_method' => 'HMAC-SHA1',
'oauth_timestamp' => 1483992393,
'oauth_version' => '1.0',
'oauth_token' => '1srqh05ega5ccw4kk8w04w44kwccw88gcgo8s8oo8ggo8o4go0',
'firstname' => 'Jim',
'lastname' => 'Contact',
'email' => 'jim@his-site.com',
'ipAddress' => '192.168.0.1',
'oauth_signature' => 'EeWujMwzEjgyWbv1ZeWZNl4ugq8=',
),
'info' =>
array (
'url' => 'http://localhost/mautic/index.php/api/contacts/new',
'content_type' => 'application/json',
'http_code' => 200,
'header_size' => 256,
'request_size' => 624,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.119952,
'namelookup_time' => 0.0041310000000000001,
'connect_time' => 0.0041739999999999998,
'pretransfer_time' => 0.0042050000000000004,
'size_upload' => 77,
'size_download' => 99,
'speed_download' => 825,
'speed_upload' => 641,
'download_content_length' => 99,
'upload_content_length' => 77,
'starttransfer_time' => 0.119934,
'redirect_time' => 0,
'redirect_url' => '',
'primary_ip' => '::1',
'certinfo' =>
array (
),
'primary_port' => 80,
'local_ip' => '::1',
'local_port' => 54679,
),
'returnedHeaders' => 'HTTP/1.1 200 OK
Date: Mon, 09 Jan 2017 20:06:33 GMT
Server: Apache/2.4.10 (Debian)
Set-Cookie: fb383c994053a92e79536ebaf21cb996=7504g4btrccn5ac9iilsssrll7; path=/; HttpOnly
Cache-Control: no-cache
Content-Length: 99
Content-Type: application/json',
'returnedBody' => '{"error":{"message":"Requested URL not found: \/mautic\/index.php\/api\/contacts\/new","code":404}}',
Error
'error' =>
array (
'message' => 'Requested URL not found: /mautic/index.php/api/contacts/new',
'code' => 404,
)
Can anyone help-me with this issue?
Thanks!! =)