Not Able to set Rest API oAuth token expire in minutes or seconds in admin. Currently it's showing hours and it will not accept like 0.5(for 30 minute etc)

<yourlocal>/rest/V1/integration/admin/token)

<yourlocal>/rest/V1/products/<sku> in my case)
200 OK

Hi @sangeetajain. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance - upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@sangeetajain do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hello @sangeetajain
I can't reproduce this issue on a fresh Magento 2.3-develop.
Manual testing scenario:
Actual result:
Configuration is saved

So i have to close this issue. If you have some updates left a comment please.
Thanks for your report!
0.5 is save but it will not work on practically. Like if we set 0.5 means token will expire after 30 minute by logic but in Magento 2.3 it's not happen.
If we put 0.5 that means it will check $hour > 0 then it will set 0 hour which is never expire toke.
Hello @sangeetajain
I can't reproduce this issue on a fresh Magento 2.3-develop.Manual testing scenario:
- Login to Admin
- Go to the Stores-->Configuration-->Services-->OAuth
- Change values in Customer Token Lifetime (hours) & in Admin Token Lifetime (hours) to '0.5'
Actual result:
Configuration is saved
So i have to close this issue. If you have some updates left a comment please.
Thanks for your report!
0.5 is save but it will not work on practically. Like if we set 0.5 means token will expire after 30 minute by logic but in Magento 2.3 it's not happen.
If we put 0.5 that means it will check $hour > 0 then it will set 0 hour which is never expire token.
@sangeetajain you are right. I will update a description of issue and confirm it.
:white_check_mark: Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-20487 were created
Issue Available: @engcom-Charlie, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
Hi @ivan-koliadynskyy. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[ ] 2. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
@sangeetajain there is no bug here. Hours are supposed to be integer and config works as expected.
What is the use case to have token expiry less than 1 hour?
@ivan-koliadynskyy : Thank you for the updated code.
Just Suggestion that In admin side it's captured the string value in input filed which is not correct thing, because it should take only number then it's better.

Hi @sangeetajain. Thank you for your report.
The issue has been fixed in magento/magento2#24769 by @ivan-koliadynskyy in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.4 release.