Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using RestSharp;
- namespace HelloWorldApplication
- {
- class HelloWorld
- {
- static void Main(string[] args)
- {
- var client = new RestClient("https://id.kiotviet.vn/connect/token");
- client.Timeout = -1;
- var request = new RestRequest(Method.POST);
- request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
- request.AddParameter("scopes", "PublicApi.Access");
- request.AddParameter("grant_type", "client_credentials");
- request.AddParameter("client_id", "7d1dd282-0749-44f0-9044-f0394c4f06eb");
- request.AddParameter("client_secret", "B796FE0B53162F33430521B7EE17C1B07D04BD4D");
- IRestResponse response = client.Execute(request);
- Console.WriteLine(response.Content);
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment