« first day    last day (16 days later) » 

05:57
Hi @Sridevi are you arround?
i need help on generating refresh token
06:19
Hi @NileshDaladra Are you trying to get access token using refresh token? Please post new question with more details on this error and share link here
Ya sure and sending you link
Okay
0
Q: Not able to get refresh token for Microsoft Graph API using access token in php

Nilesh DaldraI have Access token for v2.0 but when i am trying to get refresh token that is long lived. its give me an error prnt.sc/zaudnSFYhecT and below is the code that i am trying to add function RefreshToeknOutlook($params) { $res_data=[ 'error_msg'=>"", "full_res"=>[], ...

Please ignore description
i have tried directly to postman prnt.sc/zaudnSFYhecT
Did you get refresh token while generating access token?
06:31
Include offline_access in scopes along with Calendars.Read
ok let me do that
Okay
@s
@Sridevi now it returns both
Now you can use that refresh token to get access token
ok trying that
07:04
Please check the added answer and let me know if i works : )
@Sridevi ya sure doing using code
"token_type": "Bearer",
"scope": "Calendars.Read Calendars.ReadWrite",
"expires_in": 3600,
"ext_expires_in": 3600,
it returns 3600 records
can't it be long like for 24 hours?
"expires_in": 3600,
"ext_expires_in": 3600, is related to access token lifetime
Refresh token will stay long for 24 hrs
Did it work?
ok means for every 24 it should call refresh token
and with that i can get latest access token
07:12
Yes
ok thanks
its working on code as well
just confirming one more question i have
Okay
Thank you so much
it worked
I need one more suggestion from you
if you wish to help me
Sure, please consider clicking checkmark beside answer and upvote that helps future readers if they face similar issue
i have one cron that sending notification and its running for each 24 hours.
so i want to add event on that cron for that user.
so should i call refresh token api before running add event api?
07:23
Yes, you need to add refresh token mechanism to handle token expiration.
Refer this thread that has similar scenario of generating access token using refresh token to handle expiration.
is there any way to get latest access token once it expired after 1 hour?
@Sridevi there
08:15
Same way as I mentioned in answer. You can use refresh token flow to generate new access token once it expires
 
6 hours later…
14:26
@NileshDaldra Could you add the error image here and more details like what scope used?
Did you grant admin consent to the added Delegated permissions?

« first day    last day (16 days later) »