curl -X GET -H "apikey: [[apiKey]]" "https://hackathon.tim.it/otp/{address}?password="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.VerifyOTPApi;
import java.io.File;
import java.util.*;
public class VerifyOTPApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKey
ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
ApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.setApiKeyPrefix("Token");
VerifyOTPApi apiInstance = new VerifyOTPApi();
String address = address_example; // String | Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
String password = password_example; // String | Password received in the text of SMS.
try {
apiInstance.otpAddressGet(address, password);
} catch (ApiException e) {
System.err.println("Exception when calling VerifyOTPApi#otpAddressGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.VerifyOTPApi;
public class VerifyOTPApiExample {
public static void main(String[] args) {
VerifyOTPApi apiInstance = new VerifyOTPApi();
String address = address_example; // String | Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
String password = password_example; // String | Password received in the text of SMS.
try {
apiInstance.otpAddressGet(address, password);
} catch (ApiException e) {
System.err.println("Exception when calling VerifyOTPApi#otpAddressGet");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apikey"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apikey"];
String *address = address_example; // Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
String *password = password_example; // Password received in the text of SMS.
VerifyOTPApi *apiInstance = [[VerifyOTPApi alloc] init];
// The resource allows to check the validity of a One Time Password.
[apiInstance otpAddressGetWith:address
password:password
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Otp = require('otp');
var defaultClient = Otp.ApiClient.instance;
// Configure API key authorization: ApiKey
var ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix['apikey'] = "Token"
var api = new Otp.VerifyOTPApi()
var address = address_example; // {{String}} Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
var password = password_example; // {{String}} Password received in the text of SMS.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.otpAddressGet(address, password, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class otpAddressGetExample
{
public void main()
{
// Configure API key authorization: ApiKey
Configuration.Default.ApiKey.Add("apikey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("apikey", "Bearer");
var apiInstance = new VerifyOTPApi();
var address = address_example; // String | Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
var password = password_example; // String | Password received in the text of SMS.
try
{
// The resource allows to check the validity of a One Time Password.
apiInstance.otpAddressGet(address, password);
}
catch (Exception e)
{
Debug.Print("Exception when calling VerifyOTPApi.otpAddressGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apikey', 'Bearer');
$api_instance = new Swagger\Client\ApiVerifyOTPApi();
$address = address_example; // String | Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
$password = password_example; // String | Password received in the text of SMS.
try {
$api_instance->otpAddressGet($address, $password);
} catch (Exception $e) {
echo 'Exception when calling VerifyOTPApi->otpAddressGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::VerifyOTPApi;
# Configure API key authorization: ApiKey
$WWW::SwaggerClient::Configuration::api_key->{'apikey'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apikey'} = "Bearer";
my $api_instance = WWW::SwaggerClient::VerifyOTPApi->new();
my $address = address_example; # String | Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
my $password = password_example; # String | Password received in the text of SMS.
eval {
$api_instance->otpAddressGet(address => $address, password => $password);
};
if ($@) {
warn "Exception when calling VerifyOTPApi->otpAddressGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: ApiKey
swagger_client.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apikey'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.VerifyOTPApi()
address = address_example # String | Telephone number as tel URI in international format (global-number) with 9-16 digits and no parameters (es. tel:+393351111111).
password = password_example # String | Password received in the text of SMS.
try:
# The resource allows to check the validity of a One Time Password.
api_instance.otp_address_get(address, password)
except ApiException as e:
print("Exception when calling VerifyOTPApi->otpAddressGet: %s\n" % e)