{"action":"created","issue":{"url":"https://api.github.com/repos/mailjet/mailjet-apiv3-php/issues/24","labels_url":"https://api.github.com/repos/mailjet/mailjet-apiv3-php/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/mailjet/mailjet-apiv3-php/issues/24/comments","events_url":"https://api.github.com/repos/mailjet/mailjet-apiv3-php/issues/24/events","html_url":"https://github.com/mailjet/mailjet-apiv3-php/issues/24","id":121215949,"number":24,"title":"HTTP Error 400","user":{"login":"supportA3WEB","id":10046331,"avatar_url":"https://avatars.githubusercontent.com/u/10046331?v=3","gravatar_id":"","url":"https://api.github.com/users/supportA3WEB","html_url":"https://github.com/supportA3WEB","followers_url":"https://api.github.com/users/supportA3WEB/followers","following_url":"https://api.github.com/users/supportA3WEB/following{/other_user}","gists_url":"https://api.github.com/users/supportA3WEB/gists{/gist_id}","starred_url":"https://api.github.com/users/supportA3WEB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supportA3WEB/subscriptions","organizations_url":"https://api.github.com/users/supportA3WEB/orgs","repos_url":"https://api.github.com/users/supportA3WEB/repos","events_url":"https://api.github.com/users/supportA3WEB/events{/privacy}","received_events_url":"https://api.github.com/users/supportA3WEB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-09T11:27:29Z","updated_at":"2015-12-09T13:50:24Z","closed_at":null,"body":"Hi,\r\n\r\nI want to integrate your classes to call Mailjet and get my profile data, but I get a HTTP status 400 (and `getData()` is empty).\r\nWhen I made a mistake in my secret key, I get a HTTP 401, which I suppose is normal.\r\nI think I called your class by a wrong way but I did't found where is the problem.\r\nCan you help me please?\r\n\r\nHere is my code:\r\n```php\r\nrequire 'vendor/autoload.php';\r\nuse \\Mailjet\\Resources;\r\n\r\n$apikey = 'aaaaaaaaaaaa';\r\n$apisecret = 'bbbbbbbbbbbbbbbbbb';\r\n\r\n$mjobj = new \\Mailjet\\Client($apikey, $apisecret);\r\n$mjrep = $mjobj->get(Resources::$Myprofile);\r\necho('http_status='.$mjrep->getStatus());\r\n```\r\n\r\nThanks a lot\r\nBest regards\r\nJérôme"},"comment":{"url":"https://api.github.com/repos/mailjet/mailjet-apiv3-php/issues/comments/163241871","html_url":"https://github.com/mailjet/mailjet-apiv3-php/issues/24#issuecomment-163241871","issue_url":"https://api.github.com/repos/mailjet/mailjet-apiv3-php/issues/24","id":163241871,"user":{"login":"GuillaumeBadi","id":6558790,"avatar_url":"https://avatars.githubusercontent.com/u/6558790?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeBadi","html_url":"https://github.com/GuillaumeBadi","followers_url":"https://api.github.com/users/GuillaumeBadi/followers","following_url":"https://api.github.com/users/GuillaumeBadi/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeBadi/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeBadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeBadi/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeBadi/orgs","repos_url":"https://api.github.com/users/GuillaumeBadi/repos","events_url":"https://api.github.com/users/GuillaumeBadi/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeBadi/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T13:50:24Z","updated_at":"2015-12-09T13:50:24Z","body":"Hey @supportA3WEB !\r\n\r\nThanks for using Mailjet :airplane: \r\n\r\nActually you code works in my case:\r\n``` php\r\n<?php\r\n\r\nrequire 'vendor/autoload.php';\r\nuse \\Mailjet\\Resources;\r\n\r\n$apikey = getenv('MJ_APIKEY_PUBLIC');\r\n$apisecret = getenv('MJ_APIKEY_PRIVATE');\r\n\r\n$mjobj = new \\Mailjet\\Client($apikey, $apisecret);\r\n$mjrep = $mjobj->get(Resources::$Myprofile);\r\nvar_dump($mjrep->getData());\r\n\r\n?>\r\n```\r\n\r\n``` php\r\narray(1) {\r\n  [0]=>\r\n  array(21) {\r\n    [\"AddressCity\"]=>\r\n    string(0) \"\"\r\n    [\"AddressCountry\"]=>\r\n    string(2) \"\"\r\n    [\"AddressPostalCode\"]=>\r\n    string(0) \"\"\r\n    [\"AddressState\"]=>\r\n    string(0) \"\"\r\n    [\"AddressStreet\"]=>\r\n    string(0) \"\"\r\n    [\"BillingEmail\"]=>\r\n    string(0) \"\"\r\n    [\"BirthdayAt\"]=>\r\n    string(0) \"\"\r\n    [\"CompanyName\"]=>\r\n    string(14) \"Guillaume Badi\"\r\n    [\"CompanyNumOfEmployees\"]=>\r\n    string(1) \"1\"\r\n    [\"ContactPhone\"]=>\r\n    string(0) \"\"\r\n    [\"EstimatedVolume\"]=>\r\n    int(0)\r\n    [\"Features\"]=>\r\n    string(0) \"\"\r\n    [\"Firstname\"]=>\r\n    string(9) \"Guillaume\"\r\n    [\"ID\"]=>\r\n    int(_)\r\n    [\"Industry\"]=>\r\n    string(0) \"\"\r\n    [\"JobTitle\"]=>\r\n    string(0) \"\"\r\n    [\"Lastname\"]=>\r\n    string(4) \"Badi\"\r\n    [\"UserID\"]=>\r\n    int(_)\r\n    [\"VAT\"]=>\r\n    int(0)\r\n    [\"VATNumber\"]=>\r\n    string(0) \"\"\r\n    [\"Website\"]=>\r\n    string(0) \"\"\r\n  }\r\n}\r\n```\r\n\r\nAre you sure about your credentials ?\r\n\r\nBest,\r\nGuillaume"}}