Expand my Community achievements bar.

Join us at Adobe Summit 2024 for the Coffee Break Q&A Live series, a unique opportunity to network with and learn from expert users, the Adobe product team, and Adobe partners in a small group, 30 minute AMA conversations.
SOLVED

How to get a new access token using refresh token

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Employee

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.

View solution in original post

4 Replies

Avatar

Level 2

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

Avatar

Level 1

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

Avatar

Correct answer by
Employee

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.

Avatar

Level 1
Hi is the refresh token flow working now? Does the creative cloud support JWT, if yes please provide documentation for the same.