Expand my Community achievements bar.

SOLVED

access token expiration lengthen

Avatar

Level 1

Hello I am trying to buld a post api from wordpress to adobe campaign and I am wondering how to extend the access token expiry length. Having it expire after

86399998 seconds isn't really sustainable so I need it to last longer. I have seen another post in 2019 that it can't be extended in analytics but is that still the case (https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/jwt-access-token-how-can-...)? Alternavitely is there another option that I can use other than the access token? I am currently testing in postman
 
Any advice would be greatly appreciated
 
Cheers
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

You can get a JWT generation token python script from Adobe Support and update the expiry_time (see screenshot below)

 

DavidKangni_0-1620406610102.png

Thanks,

David



David Kangni

View solution in original post

6 Replies

Avatar

Community Advisor

Hi @Seanie2,

 

Access tokens are by default set to valid for 24hours. You can't change/extend expiry of access token. 

 

In addition JWT Tokens are an open standard. Using a standard or open source library along with their private key to programmatically generate a JWT tokens. They then use their own generated JWT token to authenticate with adobe.io and exchange it for an API access token to use in subsequent calls to interact with adobe campaign.

 

You can use libraries listed here to setup token exchange programmatically.

https://www.adobe.io/authentication/auth-methods.html#!AdobeDocs/adobeio-auth/master/JWT/JWT.md

 

Thanks, SK

Thanks, Sathees

Avatar

Level 1
Hi SK, does that mean that using wordpress it can only be done using an external php file? so it can't be tested locally?

Avatar

Community Advisor
Yes, you need to have server to host all of php program files and necessary other files from wordpress rest api to integrate with adobe i/o for token exchange and subsequently making call to adobe campaign standard using tokens obtained.
Thanks, Sathees

Avatar

Correct answer by
Community Advisor

Hi,

 

You can get a JWT generation token python script from Adobe Support and update the expiry_time (see screenshot below)

 

DavidKangni_0-1620406610102.png

Thanks,

David



David Kangni

Avatar

Level 1
Hi David, do you know how to do this via php?

Avatar

Community Advisor

Hi @Seanie2 

 

Github repo where you can find PHP code example for JWT creation and reference method that exchanges JWT with Adobe IMS Endpoint to retrieve an access token.

Thanks,

David



David Kangni