Verify a SIWE message and return a JWT for API authentication
curl --request POST \
--url https://b2b-api.dev-riseworks.io/v2/auth/verify \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"sig": "<string>",
"nonce": "<string>"
}
'import requests
url = "https://b2b-api.dev-riseworks.io/v2/auth/verify"
payload = {
"message": "<string>",
"sig": "<string>",
"nonce": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>', sig: '<string>', nonce: '<string>'})
};
fetch('https://b2b-api.dev-riseworks.io/v2/auth/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b2b-api.dev-riseworks.io/v2/auth/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'sig' => '<string>',
'nonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api.dev-riseworks.io/v2/auth/verify"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"sig\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b2b-api.dev-riseworks.io/v2/auth/verify")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"sig\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b-api.dev-riseworks.io/v2/auth/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"sig\": \"<string>\",\n \"nonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"jwt": "<string>"
}
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}Authentication
Verify a SIWE message and return a JWT for API authentication
Verifies a signed SIWE message and returns a JWT. A Viewer wallet on the personal RiseID can create payment intents when the same wallet holds PaymentInitiator, Payer, Owner or Treasurer on the team Rise Account, and pay now or make instant payments when it holds Payer, Owner or Treasurer. An Owner wallet can do all of that and invite managers. Requests must be signed by the wallet used to sign in.
POST
/
v2
/
auth
/
verify
Verify a SIWE message and return a JWT for API authentication
curl --request POST \
--url https://b2b-api.dev-riseworks.io/v2/auth/verify \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>",
"sig": "<string>",
"nonce": "<string>"
}
'import requests
url = "https://b2b-api.dev-riseworks.io/v2/auth/verify"
payload = {
"message": "<string>",
"sig": "<string>",
"nonce": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>', sig: '<string>', nonce: '<string>'})
};
fetch('https://b2b-api.dev-riseworks.io/v2/auth/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b2b-api.dev-riseworks.io/v2/auth/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'sig' => '<string>',
'nonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b2b-api.dev-riseworks.io/v2/auth/verify"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"sig\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b2b-api.dev-riseworks.io/v2/auth/verify")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"sig\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b-api.dev-riseworks.io/v2/auth/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"sig\": \"<string>\",\n \"nonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"jwt": "<string>"
}
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}{
"success": false,
"data": "<string>",
"error_code": "<string>"
}Body
application/json
The original SIWE message that was signed by the user.
The signature generated by the user when signing the SIWE message.
Kept for compatibility and ignored: the nonce is read from the signed message, which must be one issued by GET /v2/auth/siwe and not yet expired (60 minutes).
