Hi Team,
We are planning to use Recommendations API to create/update Entities.
For those API to run we need bearer token, bearer token is generated using JWT Token.
Both bearer and jwt token are not constant so how can we automate it ?
Any insight on this is reallly helpful.
Solved! Go to Solution.
Views
Replies
Total Likes
@ambikaTewari_ATCI - I provided Python code to generate JWT and Access token (https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/generating-jwt-for-target-ap...) - is this what you are after?
Regards
Rajneesh
Views
Replies
Total Likes
Found this https://developer.adobe.com/developer-console/docs/guides/authentication/JWT/samples/
does it talk about the script (in different languages) to programmatically automate the JWT token ?
Views
Replies
Total Likes
You can use client secrets to generate a new bearer token each time before the API request.
There are several scripts - for JWT encode and decode. Depending on which language you want to use.
I myself use this automated in combination with CI/CD pipelines with docker images and in bash.
Views
Replies
Total Likes
Hi @Perrin_Ennen in order to generate the bearer token (to used in API) I would need JWT token.
JWT token has the expiry so how do I generate it programmatically using keys ?
API Team doesnt have the UI access but I can share with them the API and private key.
You can do the JWT token generation manually in the UI. But it is also possible to automate this yourself.
Here is an article how it works with Bash: Generate JWT With Bash
Something like this exists for other programming languages as well.
@ambikaTewari_ATCI - I provided Python code to generate JWT and Access token (https://experienceleaguecommunities.adobe.com/t5/adobe-target-questions/generating-jwt-for-target-ap...) - is this what you are after?
Regards
Rajneesh
Views
Replies
Total Likes
yes @Rajneesh_Gautam_ I'll try this.
I got this help doc (https://developer.adobe.com/developer-console/docs/guides/authentication/JWT/samples/) also which talks about the scripts in different languages to automate the JWT generation .
Views
Replies
Total Likes