How to get a new access token using refresh token

Avatar

Avatar

sharmisthac4405

Avatar

sharmisthac4405

sharmisthac4405

16-11-2018

I am using adobe analytics 2.0 api. I have been following the document Documentation​ . I am able to generate the JSON after auth 2 authorization. I got a JSON wchich gave me access_token, refresh_token, expires_in.

"expires_in" value present a numerical value. Is this numerical value represent in second or microsecond? Is it the expiry time of access token?

My another query is I could not get any way to generate a new access token using the refresh token. After certain period of time oauth token has expired ,I need to generate reauthorize again to generate access token. But could not fina a way to use the refresh token.

I used the below curl comment to generate refresh token

curl  --data "grant_type=refresh_token&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&refresh_token={REFRESH_TOKEN}" https://ims-na1.adobelogin.com/ims/token/v1

It returned me JSON response with unauthorized client .

What is the actual call or method to generate access token using a refresh token?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Brian_Kent_Watson

Employee

Avatar

Brian_Kent_Watson

Employee

Brian_Kent_Watson
Employee

29-01-2019

Refresh token flow is not supported by Adobe Analytics V2 APIs under Adobe IO.

In the context of Adobe Analytics, Adobe IO's oAuth authentication should be used by applications that authenticate a human user for the duration of a single session. It is not suitable for use by applications that need "headless" server-to-server, service-token, or long-running authenticaitons.

In Q1 2019 (coming very soon), Analytics will support JWT authentication for situations that require server-to-server, service-token, or other long-running authentications.

We're working to update the Analytics documentation to reflect these specific ways in which the Analytics authentication under Adobe IO differs from the more general Adobe IO authentication mechanisms.

Answers (2)

Answers (2)

Avatar

Avatar

BlaM

Avatar

BlaM

BlaM

22-01-2019

For reference: The exact error message I see is {"error":"unauthorized_client"}

Avatar

Avatar

ltaparia

Avatar

ltaparia

ltaparia

08-01-2019

Hi,

Have you got solution for refresh token? I have similar problem. I asked here : How can I refresh OAuth 2.0 token before It expire

regards

Lalit