Approve an OAuth request from the Dev Portal
curl --request POST \
--url https://mcp.echozero.app/oauth/authorize/approve \
--header 'Content-Type: application/json' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>' \
--data '
{
"response_type": "code",
"client_id": "echozero-cli",
"redirect_uri": "http://127.0.0.1:8765/callback",
"scope": "read:agents read:strategies write:agents",
"state": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "S256"
}
'import requests
url = "https://mcp.echozero.app/oauth/authorize/approve"
payload = {
"response_type": "code",
"client_id": "echozero-cli",
"redirect_uri": "http://127.0.0.1:8765/callback",
"scope": "read:agents read:strategies write:agents",
"state": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "S256"
}
headers = {
"x-signature": "<x-signature>",
"x-timestamp": "<x-timestamp>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
response_type: 'code',
client_id: 'echozero-cli',
redirect_uri: 'http://127.0.0.1:8765/callback',
scope: 'read:agents read:strategies write:agents',
state: '<string>',
code_challenge: '<string>',
code_challenge_method: 'S256'
})
};
fetch('https://mcp.echozero.app/oauth/authorize/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
response_type: 'code',
client_id: 'echozero-cli',
redirect_uri: 'http://127.0.0.1:8765/callback',
scope: 'read:agents read:strategies write:agents',
state: '<string>',
code_challenge: '<string>',
code_challenge_method: 'S256'
})
};
fetch('https://mcp.echozero.app/oauth/authorize/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mcp.echozero.app/oauth/authorize/approve"
payload := strings.NewReader("{\n \"response_type\": \"code\",\n \"client_id\": \"echozero-cli\",\n \"redirect_uri\": \"http://127.0.0.1:8765/callback\",\n \"scope\": \"read:agents read:strategies write:agents\",\n \"state\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"S256\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-signature", "<x-signature>")
req.Header.Add("x-timestamp", "<x-timestamp>")
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))
}OAuth
Approve an OAuth request from the Dev Portal
Used by the Dev Portal consent page to mint an authorization code without putting the user JWT in a URL.
POST
/
oauth
/
authorize
/
approve
Approve an OAuth request from the Dev Portal
curl --request POST \
--url https://mcp.echozero.app/oauth/authorize/approve \
--header 'Content-Type: application/json' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>' \
--data '
{
"response_type": "code",
"client_id": "echozero-cli",
"redirect_uri": "http://127.0.0.1:8765/callback",
"scope": "read:agents read:strategies write:agents",
"state": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "S256"
}
'import requests
url = "https://mcp.echozero.app/oauth/authorize/approve"
payload = {
"response_type": "code",
"client_id": "echozero-cli",
"redirect_uri": "http://127.0.0.1:8765/callback",
"scope": "read:agents read:strategies write:agents",
"state": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "S256"
}
headers = {
"x-signature": "<x-signature>",
"x-timestamp": "<x-timestamp>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
response_type: 'code',
client_id: 'echozero-cli',
redirect_uri: 'http://127.0.0.1:8765/callback',
scope: 'read:agents read:strategies write:agents',
state: '<string>',
code_challenge: '<string>',
code_challenge_method: 'S256'
})
};
fetch('https://mcp.echozero.app/oauth/authorize/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
response_type: 'code',
client_id: 'echozero-cli',
redirect_uri: 'http://127.0.0.1:8765/callback',
scope: 'read:agents read:strategies write:agents',
state: '<string>',
code_challenge: '<string>',
code_challenge_method: 'S256'
})
};
fetch('https://mcp.echozero.app/oauth/authorize/approve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mcp.echozero.app/oauth/authorize/approve"
payload := strings.NewReader("{\n \"response_type\": \"code\",\n \"client_id\": \"echozero-cli\",\n \"redirect_uri\": \"http://127.0.0.1:8765/callback\",\n \"scope\": \"read:agents read:strategies write:agents\",\n \"state\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"S256\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-signature", "<x-signature>")
req.Header.Add("x-timestamp", "<x-timestamp>")
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))
}Headers
Required for API-key authenticated requests. HMAC-SHA256(secretKey, timestamp + METHOD + path + body) as lowercase hex. Omit only for JWT/OAuth session tokens or public routes.
Required with x-signature. Epoch milliseconds; rejected if drift exceeds 5 minutes. Omit only for JWT/OAuth session tokens or public routes.
Body
application/json
Example:
"code"
Example:
"echozero-cli"
Example:
"http://127.0.0.1:8765/callback"
Space-delimited OAuth scopes mapped to MCP API scopes.
Example:
"read:agents read:strategies write:agents"
Example:
"S256"
User JWT access token for browserless/local flows. Prefer Authorization: Bearer in API clients.
Response
201