How can I generate an HTTP request for vCard or vCal?
Objective
Manually generating an HTTP request to use vCard or vCal with iOS or Android devices.
Applies To
- vCard
- vCal
- iOS
- Android
- REST API
Procedure
Although supported by the REST API, Vcard and Vcal will not work with an iPhone or Android device.
You can generate the HTTP request manually by following the examples below:
rest.nexmo.com/sms/json?api_key=KEY&api_secret=SECRET&from=Test&to=1234567890&type=vcard&vcard=BEGIN%3aVCARD%0d%0aVERSION%3a2.1%0d%0aFN%3aFull+Name%0d%0aTEL%3a%2b12345678%0d%0aEMAIL%3ainfo%40acme.com%0d%0aURL%3awww.acme.com%0d%0aEND%3aVCARD
Meaning:
BEGIN:VCARD
VERSION:2.1
FN:Full Name
TEL:+12345678
EMAIL:info@acme.com
URL:www.acme.com
END:VCARD
Note:
- Text parameter with vCard type is not needed
- Avoid 'space' in from parameter
You could do the same thing with &vcal= and the URL-encoded version of that vCal string:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:uid1@example.com
DTSTAMP:19970714T170000Z
ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
SUMMARY:Bastille Day Party
END:VEVENT
END:VCALENDAR
Comments
0 comments
Please sign in to leave a comment.