Skip to content

Latest commit

 

History

History
395 lines (255 loc) · 10.5 KB

AuthenticationApi.md

File metadata and controls

395 lines (255 loc) · 10.5 KB

\AuthenticationApi

All URIs are relative to https://api.dojah.io

Method HTTP request Description
GetSenderId Get /api/v1/messaging/sender_ids Messaging - Get Sender IDs
GetSmsStatus Get /v1/messaging/sms/get_status Messaging - Get SMS Status
RequestSenderId Post /api/v1/messaging/sender_id Messaging - Request Sender ID
SendOtp Post /api/v1/messaging/otp Messaging - Send OTP
SendSms Post /api/v1/messaging/sms Messaging - Send SMS
ValidateOtp Get /api/v1/messaging/otp/validate Messaging - Validate OTP

GetSenderId

GetSenderIdResponse GetSenderId(ctx).Execute()

Messaging - Get Sender IDs

Example

package main

import (
    "context"
    "fmt"
    "os"
    dojah "github.com/dojah-inc/dojah-sdks/go"
)

func main() {

    configuration := dojah.NewConfiguration()
    apiClient := dojah.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationApi.GetSenderId(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.GetSenderId``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetSenderId`: GetSenderIdResponse
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.GetSenderId`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetSenderIdRequest struct via the builder pattern

Return type

GetSenderIdResponse

Authorization

apikeyAuth, appIdAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetSmsStatus

GetSmsStatusResponse GetSmsStatus(ctx).MessageId(messageId).Execute()

Messaging - Get SMS Status

Example

package main

import (
    "context"
    "fmt"
    "os"
    dojah "github.com/dojah-inc/dojah-sdks/go"
)

func main() {
    messageId := ""54818c8a-4aed-4e5f-b846-8274fd4e0bbd"" // string |  (optional)

    configuration := dojah.NewConfiguration()
    apiClient := dojah.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationApi.GetSmsStatus(context.Background()).MessageId(messageId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.GetSmsStatus``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetSmsStatus`: GetSmsStatusResponse
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.GetSmsStatus`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetSmsStatusRequest struct via the builder pattern

Name Type Description Notes
messageId string

Return type

GetSmsStatusResponse

Authorization

apikeyAuth, appIdAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RequestSenderId

RequestSenderIdResponse RequestSenderId(ctx).RequestSenderIdRequest(requestSenderIdRequest).Execute()

Messaging - Request Sender ID

Example

package main

import (
    "context"
    "fmt"
    "os"
    dojah "github.com/dojah-inc/dojah-sdks/go"
)

func main() {
    requestSenderIdRequest := *dojah.NewRequestSenderIdRequest() // RequestSenderIdRequest | 

    configuration := dojah.NewConfiguration()
    apiClient := dojah.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationApi.RequestSenderId(context.Background()).RequestSenderIdRequest(requestSenderIdRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.RequestSenderId``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `RequestSenderId`: RequestSenderIdResponse
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.RequestSenderId`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiRequestSenderIdRequest struct via the builder pattern

Name Type Description Notes
requestSenderIdRequest RequestSenderIdRequest

Return type

RequestSenderIdResponse

Authorization

apikeyAuth, appIdAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendOtp

AuthenticationSendOtpResponse SendOtp(ctx).AuthenticationSendOtpRequest(authenticationSendOtpRequest).Execute()

Messaging - Send OTP

Example

package main

import (
    "context"
    "fmt"
    "os"
    dojah "github.com/dojah-inc/dojah-sdks/go"
)

func main() {
    authenticationSendOtpRequest := *dojah.NewAuthenticationSendOtpRequest() // AuthenticationSendOtpRequest | 

    configuration := dojah.NewConfiguration()
    apiClient := dojah.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationApi.SendOtp(context.Background()).AuthenticationSendOtpRequest(authenticationSendOtpRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.SendOtp``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SendOtp`: AuthenticationSendOtpResponse
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.SendOtp`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSendOtpRequest struct via the builder pattern

Name Type Description Notes
authenticationSendOtpRequest AuthenticationSendOtpRequest

Return type

AuthenticationSendOtpResponse

Authorization

apikeyAuth, appIdAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SendSms

SendSmsResponse SendSms(ctx).SendSmsRequest(sendSmsRequest).Execute()

Messaging - Send SMS

Example

package main

import (
    "context"
    "fmt"
    "os"
    dojah "github.com/dojah-inc/dojah-sdks/go"
)

func main() {
    sendSmsRequest := *dojah.NewSendSmsRequest() // SendSmsRequest | 

    configuration := dojah.NewConfiguration()
    apiClient := dojah.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationApi.SendSms(context.Background()).SendSmsRequest(sendSmsRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.SendSms``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SendSms`: SendSmsResponse
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.SendSms`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSendSmsRequest struct via the builder pattern

Name Type Description Notes
sendSmsRequest SendSmsRequest

Return type

SendSmsResponse

Authorization

apikeyAuth, appIdAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ValidateOtp

AuthenticationValidateOtpResponse ValidateOtp(ctx).ReferenceId(referenceId).Code(code).Execute()

Messaging - Validate OTP

Example

package main

import (
    "context"
    "fmt"
    "os"
    dojah "github.com/dojah-inc/dojah-sdks/go"
)

func main() {
    referenceId := ""a89e4b64-367f-414f-a189-1800bc364b05"" // string |  (optional)
    code := int32(81974) // int32 |  (optional)

    configuration := dojah.NewConfiguration()
    apiClient := dojah.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthenticationApi.ValidateOtp(context.Background()).ReferenceId(referenceId).Code(code).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.ValidateOtp``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ValidateOtp`: AuthenticationValidateOtpResponse
    fmt.Fprintf(os.Stdout, "Response from `AuthenticationApi.ValidateOtp`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiValidateOtpRequest struct via the builder pattern

Name Type Description Notes
referenceId string
code int32

Return type

AuthenticationValidateOtpResponse

Authorization

apikeyAuth, appIdAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]