RelayApp Frontend Integration
Get Service Key
curl http://127.0.0.1:4567/getServiceKey{
"code": 200,
"data": "eyJhdXRoc2lnbiI6Ik1FVUNJUURhOFl..."
}Integration Steps
1
Register Self Service in RelayApp
// Example code (adjust according to actual RelayApp SDK)
let data = {
serviceKey: "eyJhdXRoc2lnbiI6..." // Complete service-key from previous step
};
let signInfo = {
content: "xxxxxxxx",
signature: "xxxxxxx"
};
// Register Self Service
let result = await relay.registerService(data, signInfo);2
Configure API Calls
// Example: Call Self Service API
let data = {
type: "HTTP",
content: {
method: "POST",
url: "/add",
headers: {
"Content-Type": "application/json"
},
data: {
id: "1",
name: "Alice"
}
}
};
let signInfo = {
content: "xxxxxxxx",
signature: "xxxxxxx"
};
let result = await relay.sendServiceMessage(data, signInfo);