cURL Example to Parse Image to vCard using Aspose.Email Rest API

Despite the website saying there is a REST API with examples, there in fact appear to be none at all, it is all focused on libraries.

And where is the references for the API for Parser?? Again there appears to both be none and aswell it appears to be unavailable, is this true

@rwu2359

Thanks for your concerns. We will update(EMAILCLOUD-460) the documentation for cURL REST API examples as soon as possible.

Meanwhile, you can use Web API explorer to get sample cURL examples for reference. For example, to parse images to vCard you can use the following API in your browser. However, you can check the following cURL commands to parse images to vCard as well. Please feel free to contact us for any further assistance in this regard.

PUT ​/email​/AiBcr​/parse Parse images to vCard document models

# First get Access Token
# Get Customer Key and Customer ID from https://dashboard.aspose.cloud/
curl -X POST "https://api.aspose.cloud/connect/token" 
-d "grant_type=client_credentials&client_id=xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxx" 
-H "Content-Type: application/x-www-form-urlencoded" 
-H "Accept: application/json"

#Parse images to vCard document models
curl -X PUT "https://api.aspose.cloud/v4.0/email/AiBcr/parse?countries=us&languages=en&isSingle=true" 
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]" 
-H "Content-Type: multipart/form-data" 
-H "x-aspose-client: Containerize.Swagger" 
-F "File"="@C:/Temp/AI_Email_Parser.png"

Thanks for that…
Do you have an example to simply parse an msg file to text??
That will help me start the journey with this client who is interested…

@rwu2359

Please check EmailFromFile API method, it will help you to parse the email. It converts an email document from your local drive to a model representation. It should work in your scenario. However, if there is any difference in your requirement and my understanding then please share your sample input email and expected output/result. We will look into it and will guide you accordingly.

https://apireference.aspose.cloud/email/#/Email/EmailFromFile

Perfect, thank you… just what the doctor ordered…

1 Like