Otp v1.0
Manage Otp verification codes which allow customers to safe api access
You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which itself is generated from annotations in the source code of the project. It is possible that this documentation includes bugs and that code samples are incomplete or wrong.
Authentication
OAuth 2.0 Authorization. Authenticate using client credentials
Flow: clientCredentials
OAuth 2.0 Authorization URL = https://auvious.video/security/oauth/authorize
OAuth 2.0 Token URL = https://auvious.video/security/oauth/token
OAuth 2.0 Scope
Scope Scope Description any this is the default
HTTP Authentication, scheme: bearer jwt bearer token access
Otp Verification Service
Otp Verification Controller
Request an otp
POST https://auvious.video:443/security/otp HTTP/1.1
Host: auvious.video:443
Content-Type: application/json
Accept: application/json
Request a otp verification code. Returns an otp verification id which should be passed on calls that are protected with otp.
Request body
{
"channel": "SMS",
"customName": "hello, world",
"locale": "en",
"to": "+306957206309"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | RequestOtpCommand | false | none |
Responses
Overview
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | OtpRequestResult |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Examples
200 Response
{
"id": "string"
}
To perform this operation, you must be authenticated by means of one of the following methods: Client Credentials Flow ( Scopes: global ), Jwt ( Scopes: global ), None ( Scopes: global ), None ( Scopes: global ), None ( Scopes: global )
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X POST https://auvious.video:443/security/otp \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
var body []byte
// body = ...
req, err := http.NewRequest("POST", "https://auvious.video:443/security/otp", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const input = '{
"channel": "SMS",
"customName": "hello, world",
"locale": "en",
"to": "+306957206309"
}';
const headers = {
'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}'
}
fetch('https://auvious.video:443/security/otp', {
method: 'POST',
body: input,
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("https://auvious.video:443/security/otp");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post(
'https://auvious.video:443/security/otp',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'https://auvious.video:443/security/otp',
params: {}, headers: headers
p JSON.parse(result)
Verify an otp
POST https://auvious.video:443/security/otp/verify HTTP/1.1
Host: auvious.video:443
Content-Type: application/json
Accept: application/json
Verify an otp verification code.
Request body
{
"code": "123456",
"to": "+306957206309",
"verificationId": "1234567890"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | VerifyOtpCommand | false | none |
Responses
Overview
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
201 | Created | Created | None |
204 | No Content | No Content | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Response Schema
Examples
To perform this operation, you must be authenticated by means of one of the following methods: Client Credentials Flow ( Scopes: global ), Jwt ( Scopes: global ), None ( Scopes: global ), None ( Scopes: global ), None ( Scopes: global )
Code samples
- Shell
- Go
- Node
- Java
- Python
- Ruby
curl -X POST https://auvious.video:443/security/otp/verify \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
var body []byte
// body = ...
req, err := http.NewRequest("POST", "https://auvious.video:443/security/otp/verify", bytes.NewBuffer(body))
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const fetch = require('node-fetch');
const input = '{
"code": "123456",
"to": "+306957206309",
"verificationId": "1234567890"
}';
const headers = {
'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer {access-token}'
}
fetch('https://auvious.video:443/security/otp/verify', {
method: 'POST',
body: input,
headers
})
.then(r => r.json())
.then((body) => {
console.log(body)
})
// This sample needs improvement.
URL obj = new URL("https://auvious.video:443/security/otp/verify");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream())
);
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post(
'https://auvious.video:443/security/otp/verify',
params={},
headers = headers)
print r.json()
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.post 'https://auvious.video:443/security/otp/verify',
params: {}, headers: headers
p JSON.parse(result)
Schemas
OtpRequestResult
{
"id": "string"
}
OtpRequestResult
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | none | none |
RequestOtpCommand
{
"channel": "SMS",
"customName": "hello, world",
"locale": "en",
"to": "+306957206309"
}
RequestOtpCommand
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
channel | string | false | none | Channel to use |
customName | string | false | none | custom name to use instead of default |
locale | string | false | none | locale to use |
to | string | true | none | Where to? |
Enumerated Values
Property | Value |
---|---|
channel | SMS |
customName | any string |
customName | but keep it short |
locale | af |
locale | ar |
locale | ca |
locale | cs |
locale | da |
locale | de |
locale | el |
locale | en |
locale | en-GB |
locale | es |
locale | fi |
locale | fr |
locale | he |
locale | hi |
locale | hr |
locale | hu |
locale | id |
locale | it |
locale | ja |
locale | ko |
locale | ms |
locale | nb |
locale | nl |
locale | or zh-HK. |
locale | pl |
locale | pr-BR |
locale | pt |
locale | ro |
locale | ru |
locale | sv |
locale | th |
locale | tl |
locale | tr |
locale | vi |
locale | zh |
locale | zh-CN |
to | any phone number |
to | or email if supported |
VerifyOtpCommand
{
"code": "123456",
"to": "+306957206309",
"verificationId": "1234567890"
}
VerifyOtpCommand
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | The otp code |
to | string | true | none | User msisdn or email |
verificationId | string | true | none | Verification id |
Enumerated Values
Property | Value |
---|---|
to | any phone number |
to | or email if supported |