Get Access Token
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>', signature: '<string>', message: '<string>'})
};
fetch('https://gp-auth-module.prod.gnosispay.com/auth/siwe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://gp-auth-module.prod.gnosispay.com/auth/siwe \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"signature": "<string>",
"message": "<string>"
}
'import requests
url = "https://gp-auth-module.prod.gnosispay.com/auth/siwe"
payload = {
"address": "<string>",
"signature": "<string>",
"message": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gp-auth-module.prod.gnosispay.com/auth/siwe"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"signature\": \"<string>\",\n \"message\": \"<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://gp-auth-module.prod.gnosispay.com/auth/siwe")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"signature\": \"<string>\",\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gp-auth-module.prod.gnosispay.com/auth/siwe")
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 \"address\": \"<string>\",\n \"signature\": \"<string>\",\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"accessToken": "<string>",
"refreshToken": "<string>"
}{
"success": false,
"error": {
"name": "ValidationError",
"message": "<string>"
}
}Auth
Get Access Token
Verify a signed SIWE message. Returns both a short-lived access token and a longer-lived refresh token in the response body. The client is responsible for storing the refresh token securely.
POST
/
auth
/
siwe
Get Access Token
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>', signature: '<string>', message: '<string>'})
};
fetch('https://gp-auth-module.prod.gnosispay.com/auth/siwe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://gp-auth-module.prod.gnosispay.com/auth/siwe \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"signature": "<string>",
"message": "<string>"
}
'import requests
url = "https://gp-auth-module.prod.gnosispay.com/auth/siwe"
payload = {
"address": "<string>",
"signature": "<string>",
"message": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gp-auth-module.prod.gnosispay.com/auth/siwe"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"signature\": \"<string>\",\n \"message\": \"<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://gp-auth-module.prod.gnosispay.com/auth/siwe")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"signature\": \"<string>\",\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gp-auth-module.prod.gnosispay.com/auth/siwe")
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 \"address\": \"<string>\",\n \"signature\": \"<string>\",\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"accessToken": "<string>",
"refreshToken": "<string>"
}{
"success": false,
"error": {
"name": "ValidationError",
"message": "<string>"
}
}⌘I