API Usage

  • We use JWT tokens to configure and administrate the account.
  • We use API token to access the records, so only the API token will be given to your CRM.

Create an account

  1. Use POST/auth/register to create your account
    curl -H "Content-Type: application/json" --data-raw '{"user":"user@domain.com","password":"secretPassword"}' https://rec.over.ovh/auth/register | jq
    fetch("https://rec.over.ovh/auth/register", {
    method: "POST",
    headers: {"accept":"application/json"},
    body: '{"user":"user@domain.com","password":"secretPassword"}'
    });
  2. Activate your account with the E-mail you should have received

Generate your tokens

  1. Get an JWT access token with POST/auth/login
    curl -H "Content-Type: application/json" --data-raw '{"user":"user@domain.com","password":"secretPassword"}' https://rec.over.ovh/auth/login | jq
    fetch("https://rec.over.ovh/auth/login", {
    method: "POST",
    headers: {"accept":"application/json"},
    body: '{"user":"user@domain.com","password":"secretPassword"}'
    });
    Resonse should be like
    {"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}
    Let store the token in JWT_ACCESS_TOKEN
  2. Use your JWT acess-token POST/ovh/add to link your OVH account
    curl -X POST -H "Authorization: Bearer $JWT_ACCESS_TOKEN" https://rec.over.ovh/ovh/add | jq
    fetch("https://rec.over.ovh/ovh/add", {
    method: "POST",
    headers: {"accept":"application/json","Authorization":"Bearer JWT_ACCESS_TOKEN"},
    });
    Resonse should be like
    {"goto":"https://eu.api.ovh.com/auth/?credentialToken=abcdefgklmnop123456789"}
    REDIRECT_DONE https://rec.over.ovh/ovh/check/abcdeghijklmnopqrstuvwzy
  3. You can use your JWT access-token POST/account/blocklist to hide some records and prevent access to them
    curl -H "Content-Type: application/json" --data-raw '{"number":"0033123456789"}' -H "Authorization: Bearer $JWT_ACCESS_TOKEN" https://rec.over.ovh/account/blocklist | jq
    fetch("https://rec.over.ovh/account/blocklist", {
    method: "POST",
    headers: {"accept":"application/json","Authorization":"Bearer JWT_ACCESS_TOKEN"},
    body: '{"number":"0033123456789"}'
    });
    Resonse should be like
    ["0033123456789"]
  4. Use your JWT access-token to create an API-token. This token will be used to access your records POST/account/apitoken
    curl -H "Content-Type: application/json" --data-raw '{"comment":"dev key","ttl":36000}' -H "Authorization: Bearer $JWT_ACCESS_TOKEN" https://rec.over.ovh/account/apitoken | jq
    fetch("https://rec.over.ovh/account/apitoken", {
    method: "POST",
    headers: {"accept":"application/json","Authorization":"Bearer JWT_ACCESS_TOKEN"},
    body: '{"comment":"dev key","ttl":36000}'
    });
    Resonse should be like
    {"value":"1234567890abcdeghijklmnopqrstuvwzyZ","comment":"dev key","expireAt":"2021-06-29T21:46:32.006Z"}
    Now keep the API token to a variable named API_TOKEN

Search for your records

Now you can use the API-token to access your records GET/records

  • Get all call from or to: +33112233 and +33112233
    curl -H "Authorization: Bearer $API_TOKEN" https://rec.over.ovh/records?number=0033112233&number=0033112233 | jq
    fetch("https://rec.over.ovh/records?number=0033112233&number=0033112233", {
    method: "GET",
    headers: {"accept":"application/json","Authorization":"Bearer API_TOKEN"},
    });
  • Get all call from not from or to: +33112233 and +33112233
    curl -H "Authorization: Bearer $API_TOKEN" https://rec.over.ovh/records?number=0033112233&number=0033112233&not=1 | jq
    fetch("https://rec.over.ovh/records?number=0033112233&number=0033112233&not=1", {
    method: "GET",
    headers: {"accept":"application/json","Authorization":"Bearer API_TOKEN"},
    });
  • Get all call longer than 10 minutes
    curl -H "Authorization: Bearer $API_TOKEN" https://rec.over.ovh/records?durationmin=600 | jq
    fetch("https://rec.over.ovh/records?durationmin=600", {
    method: "GET",
    headers: {"accept":"application/json","Authorization":"Bearer API_TOKEN"},
    });
  • Get all incomming call longer than 10 minutes
    curl -H "Authorization: Bearer $API_TOKEN" https://rec.over.ovh/records?durationmin=600&direction=IN | jq
    fetch("https://rec.over.ovh/records?durationmin=600&direction=IN", {
    method: "GET",
    headers: {"accept":"application/json","Authorization":"Bearer API_TOKEN"},
    });