Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

access token expiration lengthen

Seanie2
Level 1
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
Access token API key jwt
1 Accepted Solution
DavidKangni
Correct answer by
Community Advisor
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

View solution in original post

6 Replies
SatheeskannaK
Community Advisor
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

Seanie2
Level 1
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?
SatheeskannaK
Community Advisor
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.
DavidKangni
Correct answer by
Community Advisor
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

View solution in original post

DavidKangni
Community Advisor
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