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
GiuliaMGiuliaM 

Einstein OCR (Vision & Language)

Hi all,
Do you know why the link for retrieving the token to use Einstein OCR APIs is not working anymore? Link is this one https://api.einstein.ai/token. We get a 500 also by using APIs. We implemented a business card reader but suddenly stopped working.
 
Thank you for your help!
VinayVinay (Salesforce Developers) 
Hi Giuliam,

You would need to generate tokens at runtime before calling OCR API. We will use API https://api.einstein.ai/v2/oauth2/token for generating tokens from the apex.

https://salesforcecodex.com/salesforce/create-ocr-app-using-salesforce-einstein-ocr-api/

Please mark as Best Answer if above information was helpful.

Thanks,
GiuliaMGiuliaM
That is exactly what we did and what does not work.
Kushaal SharanKushaal Sharan
Hi Giulliam
I have been facing the same issue. Can you confirm if the response is returned as -
{
    "message": "Invalid EAI Principal. Principal was not found based on assertion."
}
 Think this is deprecated or something. It returned the responses correctly until sometime  back.