API works in Postman,but gives internal server error in c# code generated through postman

My question:
A vendor had created 3 rest api and given to me for consuming.I used the c# code generated through postman and i was able to consume 2 api.One of the API though has been giving internal server error 500.But when i test it through postman ,the API works.Now the vendor is putting the blame on me ,that if the API works on postman their job is done.Is there a possibility ,that code may work through postman and not through c# code?The code is hardly 10 lines and i have double checked all the parameters .I used Rest Sharp library.This code was working 3 weeks ago and the vendor that time hadnt handled mobile number validation ,i.e if mobile number is greater than 8 digits i used to get internal server error in postman and c# code .That was corrected ,but now the vendor doesnt admit any mistake as code works in Postman.

Details (like screenshots):

  public void create_user(string token)
            var options = new RestClientOptions("url")
                MaxTimeout = -1,
            var client = new RestClient(options);
            var request = new RestRequest("/api/create_user_vehical", Method.Post);
            request.AddHeader("Authorization", token);
            request.AddHeader("Cookie", "session_id=397da3230d3a0f25ea25ed5c552f9e7a455ca436");
            request.AlwaysMultipartFormData = true;
            request.AddParameter("name", "Tes6754");
            request.AddParameter("mobile", "99362655");
            request.AddParameter("email", "testing@gmail.com");
            request.AddParameter("company", "test");
            RestResponse response = client.Execute(request);

If it works in Postman, then it sounds like the problem is with the code.

It does sound fishy that it was working before the recent change and the change shouldn’t really have made any difference to you code wise, but with the information provided, it does still sound like its a problem with the code otherwise you would expect Postman to fail as well.

I’m not a developer, so I can’t tell you what might be wrong with your code. The only thing I would potentially check is whether the mobile number is a string or a number.

You might want to post this on Stack Overflow.

On a side note, you could have handled the mobile number validation in your code with a regex. Or at the front end when the form is filled in. This way the error is caught early, instead of when its hits the API. (I guess its good to have it in multiple places if its important).