cancel
Showing results for 
Search instead for 
Did you mean: 

CI to External REST API OAuth Refresh token

David_Oexner
Participant

Dear All,

I am trying to call an external REST API using OAuth token authentication. The API provider mentioned that I need to use refresh token once the access token expires. How to send this refresh token from CI to the API? Please guide with the steps as I couldn't find clear documentation.

lhommeplante
Discoverer
0 Kudos

I'm interested in your integration flow, can you share it with details? I'm doing the same scenario. Thanks

View Entire Topic
VijayKonam
Active Contributor
0 Kudos

When you maintain the credentials (client id and secret) as OAuth credential in CI, it would automatically fetches a fresh token every time (default behavior as I observed). Unless you have to reuse and fetch a fresh one only when the current token expires, you do not have to orchestrate any logic.

David_Oexner
Participant
0 Kudos

Regarding access token expiration, my query is whether we must initiate the complete authorization flow anew by utilizing credentials and obtaining a fresh access token. Is there a possibility to acquire a refresh token within CI environment and utilize it to obtain a new access token without having to start the process from scratch?

VijayKonam
Active Contributor
0 Kudos

This one falls under OAuthe Authorization Code type of integration. Did you check that? Client_Credentials type deals only with access token. The formers deals with refresh token and access token. However, I am not sure if the refresh token will be automatically fetched. You may have to experiment and figure out.

David_Oexner
Participant
0 Kudos

Yes, your answer is helpful. I will check. Thank you.

abhinavsingh04
Discoverer
0 Kudos
how to generate the the refresh token? I am able to generate the access token using grant type as client credentials but refresh token isn't coming.