function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kushaal SharanKushaal Sharan 

Einstein Token issue

I am exploring Metamind Einstein api. I set it up I followed all the steps from refernece link -
Salesforce Codex - Create OCR App (https://salesforcecodex.com/salesforce/create-ocr-app-using-salesforce-einstein-ocr-api/" target="_blank)
This worked perfectly fine untill yesterday it stopped working. I debugged the code and found in the getAccessToken() method while making a rest callout to https://api.einstein.ai/v2/oauth2/token  the response is getting returned as - 
{"message": "Invalid EAI Principal. Principal was not found based on assertion."}
Is there some depreaction happened? Is this no longer valid for token generation. I have the pem file stored correctly and it's getting returned successfully. What does the error mean?
 
#Integration  #New Releases  #Analytics
SwethaSwetha (Salesforce Developers) 
HI Kushaal,

Can you try api.metamind.io instead of api.einstein.ai as it seems like only paid customers can use api.einstein.ai 

If this information helps, please mark the answer as best. Thank you
Dev AngelDev Angel
Do not use the api.metamind.io url. That URL will be decommissioned by Oct 10, 2023. Einstein Vision and Language is being retired, you should not base a new solution on it. We don't have a replacement so the best bet is to look at another provider for this kind of functionality.