I am new to this API concept. So, the access token lifetime is one hour. So if i want a new access token, do i have to repeat the step from getting the code and then refresh token???
Also how many times can i use the refresh token to get a new access token, if an access token expires in an hour.
When getting the access token, you also get a refresh token. Then you can keep that refresh token stored and use it to request a new access token every time, indefinitely.
Yes, correct - when the access token is expired, use the refresh token to get a new access token, using the token exchange endpoint. And yes, you can do that process indefinitely (as long as the user has the application authorized).
Also FYI I moved this thread to the Developers & API forum section.