Method Community

 

"The API could not validate your log in" trying to update a record with an invalid RecordID

Last post 08-05-2015 4:51 PM by Method_Jonathan. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-05-2015 10:44 AM

    "The API could not validate your log in" trying to update a record with an invalid RecordID

    When trying to peform a MethodAPIUpdateV2 operation on a record, if the RecordID doesn't exist, I'm receiving an error:

    The API could not validate your log in. Please make sure you have entered the correct Company Account, User and Password, and that each are spelt correctly. Also, ensure that this User has been configured for Method API access by going to Customize > Users, editing the User, and ensuring that there is a check in the 'Is Allowed to Connect via MethodAPI' checkbox.

    Did something change recently, because I'm pretty sure I used to receive an error that said something like "The Record ID does not exist"?

  • 08-05-2015 11:12 AM In reply to

    Re: "The API could not validate your log in" trying to update a record with an invalid RecordID

    Rgatton,

    An update was made to the API last week which might be the cause to this.  Can you please provide me with a code snippet and recordID you are using so that we can replicate this on your account?  I will have the dev team investigate further.

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
  • 08-05-2015 12:41 PM In reply to

    Re: "The API could not validate your log in" trying to update a record with an invalid RecordID

    Well, I'm receiving the error if I pass any non-existent RecordId to the Update method. It seems to happen on any table. Code snippets below:

    //from Method request wrapper class
    public MethodApiResponse UpdateRecord(int MerchantId, string Table, string[ Fields, string[ Values, string RecordId)
    {
        MethodWebService.Service svc = new MethodWebService.Service();

        string result = svc.MethodAPIUpdateV2(company, username, password, "", Table, Fields, Values, RecordId);

        MethodApiResponse ApiResponse = ParseApiResponse(result);

        return ApiResponse;
    }

    //Example call that succeeds
    MethodApiResponse response = methodWrapper.UpdateRecord(1, "Activity", new string[ { "ActivityStatus" }, new string[ { "Completed" }, "68");

    //Example call that fails with "API could not validate your log in" error
    MethodApiResponse response = methodWrapper.UpdateRecord(1, "Activity", new string[ { "ActivityStatus" }, new string[ { "Completed" }, "99999");

    The Method company name I'm using for this test is "rgsoftware".

  • 08-05-2015 4:14 PM In reply to

    Re: "The API could not validate your log in" trying to update a record with an invalid RecordID

    I just tried another test using this command:

    MethodApiResponse response = methodWrapper.UpdateRecord(1, "Activity", new string[ { "BogusFieldName" }, new string[ { "Test Value" }, "68");

    which should return an error indicating that the column doesn't exist is also returning the same "API could not validate your log in" error message. So it looks like this is probably affecting every error condition. Based on our log files, it looks like this started on 7/30.

  • 08-05-2015 4:51 PM In reply to

    Re: "The API could not validate your log in" trying to update a record with an invalid RecordID

    Thank you for the update - We can replicate this on our end.  

    I have created a ticket for our dev team to investigate this further.  I will post back once I have an update for you. 

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
Page 1 of 1 (5 items)