Verify anonymous OTP
POST
/api/v2.0/stores/{storeId}/otp-verification
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.diller.app/api/v2.0/stores/your-store-id/otp-verification"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"phone\": { \"country_code\": \"example\", \"number\": \"example\" }, \"otp_code\": 1 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.diller.app/api/v2.0/stores/your-store-id/otp-verification"
payload := strings.NewReader("{ \"phone\": { \"country_code\": \"example\", \"number\": \"example\" }, \"otp_code\": 1 }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"phone\": { \"country_code\": \"example\", \"number\": \"example\" }, \"otp_code\": 1 }");Request request = new Request.Builder() .url("https://api.diller.app/api/v2.0/stores/your-store-id/otp-verification") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api.diller.app/api/v2.0/stores/your-store-id/otp-verification', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, data: {phone: {country_code: 'example', number: 'example'}, otp_code: 1}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.diller.app/api/v2.0/stores/your-store-id/otp-verification';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"phone":{"country_code":"example","number":"example"},"otp_code":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.diller.app/api/v2.0/stores/your-store-id/otp-verification \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "phone": { "country_code": "example", "number": "example" }, "otp_code": 1 }'Verifies an OTP sent to a phone number belonging to an anonymous member (who has not yet enrolled).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”storeId
required
string
Example
your-store-idRequest Body
Section titled “Request Body”object
phone
object
country_code
required
string
number
required
string
otp_code
integer format: int32
Examplegenerated
{ "phone": { "country_code": "example", "number": "example" }, "otp_code": 1}object
phone
object
country_code
required
string
number
required
string
otp_code
integer format: int32
Examplegenerated
{ "phone": { "country_code": "example", "number": "example" }, "otp_code": 1}object
phone
object
country_code
required
string
number
required
string
otp_code
integer format: int32
Examplegenerated
{ "phone": { "country_code": "example", "number": "example" }, "otp_code": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
object
is_ok
boolean
details
string
Examplegenerated
{ "is_ok": true, "details": "example"}Bad Request
Media typeapplication/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
errors
object
key
additional properties
Array<string>
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": { "additionalProperty": [ "example" ] }}