The client application made an invalid request error in Identity server for implicit grant type
Options
Mehrnoosh
Member Posts: 36 ✭
Hi Guys,
I have struggled to get the access token from identity server by calling the following url:
https://identity.reckon.com/connect/authorize?client_id=8b81cbce-c2e0-4ad6-8432-b4364d27a5f8&res...
I've tried it by Postman and WSO2 ESB and also hit it through the browser, I've received the same error:
The client application made an invalid request error.
When I changed the redirect url to something else (i.e add http:// at start), the error is changed to "The client application is not known or is not authorized."
I checked my application permission for identity server from here:https://identity.reckon.com/permissions
This is "Implicit ClientsResource Permissions
Read dataWrite data"
This is the payload factory which I send to this endpoint "https://identity.reckon.com/connect/authorize"
Payload:
{ "client_id": "8b81cbce-c2e0-4ad6-8432-b4364d27a5f8", "grant_type": "implicit", "response_type": "id_token+token", "scope": "openid+read+write", "redirect_uri": "symphony3devau.com";, "state": "random_state", "nonce": "random_nonce" }
I've tried to get access token through the AZURE portal and it works, but the access token is expired after a couple of hours, so I cannot hardcode it in my application.
Could you please guide me how to fix it?
I really appreciate your help
I have struggled to get the access token from identity server by calling the following url:
https://identity.reckon.com/connect/authorize?client_id=8b81cbce-c2e0-4ad6-8432-b4364d27a5f8&res...
I've tried it by Postman and WSO2 ESB and also hit it through the browser, I've received the same error:
The client application made an invalid request error.
When I changed the redirect url to something else (i.e add http:// at start), the error is changed to "The client application is not known or is not authorized."
I checked my application permission for identity server from here:https://identity.reckon.com/permissions
This is "Implicit ClientsResource Permissions
Read dataWrite data"
This is the payload factory which I send to this endpoint "https://identity.reckon.com/connect/authorize"
Payload:
{ "client_id": "8b81cbce-c2e0-4ad6-8432-b4364d27a5f8", "grant_type": "implicit", "response_type": "id_token+token", "scope": "openid+read+write", "redirect_uri": "symphony3devau.com";, "state": "random_state", "nonce": "random_nonce" }
I've tried to get access token through the AZURE portal and it works, but the access token is expired after a couple of hours, so I cannot hardcode it in my application.
Could you please guide me how to fix it?
I really appreciate your help
0
Comments
-
The team are looking at this today Mehrnoosh.1
-
Hi Jason,
Thanks0 -
HI Mehrnoosh,
Thank you for your post.
The reason why you're getting this error is because your account is set for "Authorization Code".
Please choose that as your authorisation method and follow the instructions from the below article that tells you how to obtain code via this method.
https://reckon.helpdocsonline.com/reckon-api-authorisation-services
Hope this helps.
Ifti
Reckon API Team1 -
Also, if you do need Implicit Mehrnoosh please send the team an email outlining your use case.1
-
Hi Ifti,
Thanks for your prompt reply.
I've tried the Authorization code as well, Once I try it through the Azure portal, I've received this error:The client application is not known or is not authorized.
Azure Portal works only for implicit for my account. I sign in to the Azure portal with this account: fcoleman@symphony3.com
When I test this one with Postman or WSO2 ESB, I've received this error:The client application made an invalid request.
my endpoint:
https://identity.reckon.com/connect/authorize
Payload :
{ "client_id": "8b81cbce-c2e0-4ad6-8432-b4364d27a5f8", "response_type": "code", "scope": "openid+read+write+offline_access", "redirect_uri": "symphony3devau.com", "state": "random_state", "nonce": "random_nonce" }
Header=
Authorization: Basic OGI4MWNiY2UtYzJlMC00YWQ2LTg0MzItYjQzNjRkMjdhNWY4
Thanks,
0 -
Hi Jason,
Actually, I prefer to have a static token to use it in my code. Because I use a middleware (WSO2 ESB) to integrate our CRM system to Reckon and I'm not sure about this middleware to could handle it. Is it possible at all?
Thanks,0 -
Hi Mehrnoosh,
I've just tested it with Postman and I received a 200 OK response. I can't see the response code in the URL as the callback url should get the response back.
Please make sure you're passing through the "Params" with the URL and add client ID etc. in that.
Example shot:
Please see if it helps.
Ifti
0 -
Thanks.
I've received this 200 OK as well but in the body of response an error instead of code?
I've attached my request and error:
0 -
Ok. I've changed to "Implicit". Can you please try it again?
Edit: Please make sure you've changed the URL to the below format:
Sample HTTPS Call (Implicit grant type)
https://identity.reckon.com/connect/authorize?client_id=<<CLIENT ID>>&response_type=id_token+token&scope=openid+read+write&redirect_uri=http://127.0.0.1/index.html&state=random_state&nonce=random_nonce0 -
The same error:
This is my URL:
https://identity.reckon.com/connect/authorize?client_id=8b81cbce-c2e0-4ad6-8432-b4364d27a5f8&res...
I've received code 200 but still, this error shows up in the response body:
The client application made an invalid request
0 -
Hi Mehrnoosh,
Figured out the problem.
In your url to get the code back, you had "url" instead of "uri" (universal resource indicator)" <"redirect_url" instead of "redirect_uri">.
Please rename that part and it should work.
Ifti0 -
,Ifti
Thanks,
I really appreciate your help. It was a silly mistake by me. I changed it to redirect_uri but it doesn't work. the same error shows up.0 -
Hi Mehrnoosh,
I was about to give you the updated URL. You didn't have Https:// in the url. We need that one in the call back URL.
Please try with the below URL and it should work:
https://identity.reckon.com/connect/authorize?client_id=8b81cbce-c2e0-4ad6-8432-b4364d27a5f8&res...
Thanks
Ifti
1 -
Thank you so much.
It works now:) I really appreciate your patience and your support
Best Regards,2 -
That's great to hear!
Just FYI: You could use Implicit within Azure portal because that only works in Implcit mode. It doesn't take client ID and secret into consideration.
Happy coding
Ifti1
Categories
- All Categories
- 6.4K Accounts Hosted
- 10 📢 Reckon Accounts Hosted - Announcements
- 5.9K Reckon Accounts (Desktop)
- 3 📢 Reckon Accounts Desktop - Announcements
- 1.3K Reckon Payroll 🚀
- 21 📢 Reckon Payroll - Announcements
- 21 Reckon Payroll Help Videos 🎥
- 21 Reckon Mate App
- 3K Reckon One
- 7 📢 Reckon One - Announcements
- 10 Reckon Invoices App
- 14 Reckon Insights
- 107 Reckon API
- 822 Payroll Premier
- 307 Point of Sale
- 1.9K Personal Plus and Home & Business
- 63 About Reckon Community