How to get a new access token using refresh token

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)

Brian_Kent_Wats
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.