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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Generate JWT token for AEP without Adobe I/O

lakshmir9003361
Level 1
Level 1

Hi,

 

Can anyone help me to understand if we can generate JWT token without using Adobe I/O.

If possible what is the API link and the parameters required to be passed.

If there is any document that could help

2 Replies
abu_shafi
Level 2
Level 2
1. Make sure the your certificate key fingerprint is added 
abu_shafi_0-1634614302872.png

 

Example node.js for generating the JWT
 
'use strict';

const fs = require('fs');
const jwt = require('jsonwebtoken');
var expiry =  Date.now() + 86400000 ;

var jwtPayload = {
    "exp":expiry,
    "iss":"<org id>",
    "sub":"<email>",
    "https://ims-na1.adobelogin.com/s/ent_audiencemanagerplatform_sdk":true,
    "aud":"https://ims-na1.adobelogin.com/c/890bbe...."
};
var privateKey = fs.readFileSync("../aam-api/secret.pem");

jwt.sign(jwtPayload, privateKey, { algorithm: 'RS256' }, function(err, token) {
    console.log(token);
    return token;
});