Expand my Community achievements bar.

Generate JWT token for AEP without Adobe I/O

Avatar

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

Topics

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

2 Replies

Avatar

Level 5
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;
});