gboudreau / nissan-connect-php

Use the Nissan Connect (was Carwings) API using a simple PHP class.
GNU General Public License v3.0
38 stars 17 forks source link

Receiving INVALID PARAMS response #22

Closed karora closed 6 years ago

karora commented 6 years ago

Using the password that I log into the CarWings website with, and using a copy of the example app, I just get an INVALID PARAMS response:

$ php getStatus.php
[2018-08-04 23:08:44] [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/gworchest_160803EC/gdc/InitialApp.php {"custom_sessionid":"","initial_app_strings":"geORNtsZe5I4lRGjG9GZiA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe\/Dublin"}
[2018-08-04 23:08:45] [NissanConnect] Response: {"status":200,"message":"success","baseprm":"uyI5Dj9g8VCOFDnBRUbr3g"}
[2018-08-04 23:08:45] [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/gworchest_160803EC/gdc/UserLoginRequest.php {"UserId":"andrew@mcmillan.net.nz","Password":"XXXXXXXXXXXX","custom_sessionid":"","initial_app_strings":"geORNtsZe5I4lRGjG9GZiA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe\/Dublin"}
An error occurred: Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS"}

I see the same error using the github.com/joeshaw/carwings code, so this isn't PHP specific - just frustrating :-/

Thanks, Andrew McMillan.

karora commented 6 years ago

It seems this now works when I switch the "UserId" to be a username rather than an email address.