Send a Verification Token

In this Verify API Quickstart, you'll learn how to send your first verification token from your web application using the MessageBird Verify API.

Step 1: Sign up for free

Before we get started, sign up to MessageBird for free and collect your live API key from the Developer Dashboard.

Step 2: Send your first verification token

Next, enter your credentials and mobile number - as both the

originator
and
recipient
- to the snippet below.

$ curl -X POST https://rest.messagebird.com/verify \
-H 'Authorization: AccessKey YOUR-API-KEY' \
-d "recipient=31XXXXXXXXX" \
-d "originator=YourName"

Next, simply copy the above snippet to your terminal and hit enter.

Good job! You’ve sent your first verification token with MessageBird’s Verify API.

Step 3: View the response

Now, let’s view MessageBird’s HTTP response to your API call. If the set up was correct, you'll receive a response similar to this:

{
id: "4e213b01155d1e35a9d9571v00162985",
href: "https://rest.messagebird.com/verify/4e213b01155d1e35a9d9571v00162985",
recipient: 31XXXXXXXXXX,
reference: null,
messages: {
href: "https://rest.messagebird.com/messages/31bce2a1155d1f7c1db9df6b32167259"
},
status: "sent",
createdDatetime: "2016-05-03T18:12:54+00:00"
validUntilDatetime: "2016-05-03T18:13:24+00:00"
}

If something went wrong, you’ll receive an error response from the MessageBird API. Don't worry, simply head over to Verify API Troubleshooting to understand the error.

Congrats! You can now programmatically send a verification token with the MessageBird Verify API using cURL.

Next Steps

You may now want to check out these resources:

Questions?

We’re always happy to help with code or other questions you might have! Search our API Reference, check the Developer tutorials or contact support.

Cookie Settings