In a configurator UD method, I’m using RestSharp to retrieve an access token from Auth0. The token is coming back. I’m passing the token into a rest request, and trying to retrieve Json from a local Visual Studio C# project. The Json is coming back null. Here is the method that sends the request (the packageID and token are passed in as parameters):
var client = new RestClient("");
var request = new RestRequest(packageID, Method.GET);
request.AddHeader(“authorization”, "Bearer " + token);
IRestResponse response = client.Execute(request);
string json = response.Content.ToString();
return json;
This code is working in LinqPad, but not in Epicor. The Pilot version is 10.2.700.27. The Dev version is 10.2.500.19. Both environments are giving the same result. Has anyone used similar code to retrieve Json with a Rest Client successfully, or used another way to retrieve Json when passing in an access token?