-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad Request #2
Comments
It could be everything. |
Hi, I've managed to install the plugin into Nop (3.90), I've created a Api client in the nop admin at: /Plugins/ManageClientsAdmin/ Now using the Sample application I've entered the details, copying them from the nop admin. Whenever I hit 'GetAccessToken' from the sample application I get a 400 bad request. Which is failing on I've attached the following images which may help. I've also tried removing slashes and running through IIS but still get the same error. Any ideas? |
Ok it was a config error, The callback URL in nop needs to have '/token' at the end. |
Not sure, your config looks correct.
Put a break point in the NopCommerce plugin - Nop.Plugin.Api.Controllers.OAuth.OAuthController.Authorize method see if it's hitting it. |
Thanks for the reply. Now i am able to access get customers method. just restart the vs2015, clean and rebuilt solution(NopCommerce) and it works. |
Hi,
I'd put a break point and step through, it might not be in the DTO
mappings, so you may need to add it. Other things to check that the
customer is active and it's not data related.
…On 21 June 2017 at 09:56, DarshitThakkar23 ***@***.***> wrote:
I am not able to get RoleIds when i use GetCustomers web api method. It
always show as Count = 0. Is there anythig i need to configure?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APghVRK7f5Pmuj4KLq8NPY0jyOIt-yDRks5sGNq4gaJpZM4K9JnR>
.
|
is it possible that after sometime inactive I get /oauth/authorize response BadRequest 'Bad Request' ? if I deploy the website, the error is fixed, but then is back. |
HI, Not 100% sure, After a period of time the access token will expire, I don't think it should return a bad request response. |
@RobertCarlaw |
I am using the snipet sugested in SevenSpikes/api-plugin-for-nopcommerce#31 |
Don't see any issues but if you already have a token then there is no real need to obtain a new one until the current one is valid. So you should get a new token (preferably using the refresh token) only when the current access token is expired in which case you will get 401 Unauthorized response when trying to access any of the endpoints. |
I think that I found the reason for the Bad Request status code. My callback url is http://localhost:19890/token but using RestSharp I don't need to setup that url. |
You should remove the /en at the end of the Server URL. |
Hi guys, im using nop3.8 and followed the steps and getting Bad Request error.
What could be wrong ?
The text was updated successfully, but these errors were encountered: