Quantcast
Viewing all articles
Browse latest Browse all 9076

BadRequest with EPiServer.ServiceApi.Commerce 3.0.1

Hi,

anyone, who checked out sourecoure of QuickSilver(https://github.com/episerver/Quicksilver ) with latest version("QuickSilver release version 10.7.1" by Ba Luu on 6/6/2017) & install EPiServer.ServiceApi.Commerce then can get token successfully ? remember that checkout to have the new sourcecode & new site without any cache.

I tried to check out & install EPiServer.ServiceApi.Commerce Version 3.0.1 but can't get token by sourcecode testing as below:

client.BaseAddress = new Uri("https://mysite/");
                var fields = new Dictionary<string, string>
                {
                    { "grant_type", "password" },
                    { "username", "myuser" },
                    { "password", "mypassword" }
                };
                try
                {
                    var response = client.PostAsync("/episerverapi/token", new FormUrlEncodedContent(fields)).Result;
                    if (response.StatusCode == HttpStatusCode.OK)

{........}

StatusCode always return Badrequest.

remember to check out a new sourcecode & buid a new site, not pull to current sourcecode to avoid cache.

Of course I checked the ServiceApi installed successully by access https://mysite/EPiServerApi/version & https://mysite/EPiServerApi/Token from browser

This also occuring when we buil alloy site then installing the EPiServer.ServiceApi.Commerce on that.

Thanks


Viewing all articles
Browse latest Browse all 9076

Trending Articles