NetSuite Account Integration API Issue in c#

I’m integrating NetSuite Account API into Asp.Net c#, i’m getting unauhthorized error,

here is error message:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>{"type":"https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.2","title":"Unauthorized","status":401,"o:errorDetails":[{"detail":"Invalid login attempt. For more details, see the Login Audit Trail in the NetSuite UI at Setup > Users/Roles > User Management > View Login Audit Trail.","o:errorCode":"INVALID_LOGIN"}]}
</code>
<code>{"type":"https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.2","title":"Unauthorized","status":401,"o:errorDetails":[{"detail":"Invalid login attempt. For more details, see the Login Audit Trail in the NetSuite UI at Setup > Users/Roles > User Management > View Login Audit Trail.","o:errorCode":"INVALID_LOGIN"}]} </code>
{"type":"https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.2","title":"Unauthorized","status":401,"o:errorDetails":[{"detail":"Invalid login attempt. For more details, see the Login Audit Trail in the NetSuite UI at Setup > Users/Roles > User Management > View Login Audit Trail.","o:errorCode":"INVALID_LOGIN"}]}

here is api base url:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>https://test123.suitetalk.api.netsuite.com/
</code>
<code>https://test123.suitetalk.api.netsuite.com/ </code>
https://test123.suitetalk.api.netsuite.com/

I try to use both HttpCLient and RestClient, but resposne error was same.

here is my RestClient code:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code> var options = new RestClientOptions("https://test123.suitetalk.api.netsuite.com/")
{
MaxTimeout = -1,
};
var client = new RestSharp.RestClient(options);
var request = new RestRequest("services/rest/record/v1/account/100", Method.Get);
request.AddHeader("Authorization", "OAuth realm="dd",oauth_consumer_key="ff",oauth_token="ff",oauth_signature_method="HMAC-SHA256",oauth_timestamp="ss",oauth_nonce="ss",oauth_version="1.0",oauth_body_hash="rtr=",oauth_signature="dd="");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
</code>
<code> var options = new RestClientOptions("https://test123.suitetalk.api.netsuite.com/") { MaxTimeout = -1, }; var client = new RestSharp.RestClient(options); var request = new RestRequest("services/rest/record/v1/account/100", Method.Get); request.AddHeader("Authorization", "OAuth realm="dd",oauth_consumer_key="ff",oauth_token="ff",oauth_signature_method="HMAC-SHA256",oauth_timestamp="ss",oauth_nonce="ss",oauth_version="1.0",oauth_body_hash="rtr=",oauth_signature="dd=""); RestResponse response = await client.ExecuteAsync(request); Console.WriteLine(response.Content); </code>
 var options = new RestClientOptions("https://test123.suitetalk.api.netsuite.com/")
 {
     MaxTimeout = -1,
 };
 var client = new RestSharp.RestClient(options);

   var request = new RestRequest("services/rest/record/v1/account/100", Method.Get);

request.AddHeader("Authorization", "OAuth realm="dd",oauth_consumer_key="ff",oauth_token="ff",oauth_signature_method="HMAC-SHA256",oauth_timestamp="ss",oauth_nonce="ss",oauth_version="1.0",oauth_body_hash="rtr=",oauth_signature="dd="");
   RestResponse response = await client.ExecuteAsync(request);
   Console.WriteLine(response.Content);

Here is code by using HttpClient,

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code> var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://test123.suitetalk.api.netsuite.com/services/rest/record/v1/account/111");
request.Headers.Add("Authorization", "OAuth realm="dd",oauth_consumer_key="ff",oauth_token="ff",oauth_signature_method="HMAC-SHA256",oauth_timestamp="ss",oauth_nonce="ss",oauth_version="1.0",oauth_body_hash="rtr=",oauth_signature="dd="");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
</code>
<code> var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://test123.suitetalk.api.netsuite.com/services/rest/record/v1/account/111"); request.Headers.Add("Authorization", "OAuth realm="dd",oauth_consumer_key="ff",oauth_token="ff",oauth_signature_method="HMAC-SHA256",oauth_timestamp="ss",oauth_nonce="ss",oauth_version="1.0",oauth_body_hash="rtr=",oauth_signature="dd=""); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); </code>
       var client = new HttpClient();
            var request = new HttpRequestMessage(HttpMethod.Get, "https://test123.suitetalk.api.netsuite.com/services/rest/record/v1/account/111");

request.Headers.Add("Authorization", "OAuth realm="dd",oauth_consumer_key="ff",oauth_token="ff",oauth_signature_method="HMAC-SHA256",oauth_timestamp="ss",oauth_nonce="ss",oauth_version="1.0",oauth_body_hash="rtr=",oauth_signature="dd="");

 var response = await client.SendAsync(request);
 response.EnsureSuccessStatusCode();
 Console.WriteLine(await response.Content.ReadAsStringAsync());

With both approach getting same error, when i try to test api in postman, then it is working successfully!

How i can resolve this issue into my code?
Anyone can help quickly?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật