API ReferenceChallengeVerify Aptos challengeVersion: 2.0Verify Aptos challengePOSThttps://authapi.moralis.io/challenge/verify/aptosBODY PARAMmessagestringrequiredMessage that needs to be signed by the end user.signaturestringrequiredEIP-191 compliant signature signed by the Aptos account address requesting authentication.Responses201 The token to be used to call the third party API from the clientobjectAPI KEYTest Live APINode.jsPythoncURLGoPHP// Dependencies to install:// $ npm install node-fetch --save// add "type": "module" to package.jsonimport fetch from 'node-fetch';const options = { method: 'POST', headers: { accept: 'application/json', 'content-type': 'application/json', 'X-API-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ "message": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z", "signature": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c" })};fetch('https://authapi.moralis.io/challenge/verify/aptos', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://authapi.moralis.io/challenge/verify/aptos"payload = { "message": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z", "signature": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c"}headers = { "Accept": "application/json", "Content-Type": "application/json", "X-API-Key": "YOUR_API_KEY"}response = requests.request("POST", url, json=payload, headers=headers)print(response.text)curl --request POST \ --url 'https://authapi.moralis.io/challenge/verify/aptos' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' \ --header 'content-type: application/json' \ --data '{ "message": "defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z", "signature": "0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c"}'package mainimport ( "fmt" "strings" "net/http" "io/ioutil")func main() { url := "https://authapi.moralis.io/challenge/verify/aptos" payload := strings.NewReader("{\"message\":\"defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z\",\"signature\":\"0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c\"}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("Content-Type", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('POST', 'https://authapi.moralis.io/challenge/verify/aptos', [ 'body' => '{"message":"defi.finance wants you to sign in with your Aptos account:\n0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d\n\n\nURI: https://defi.finance\nVersion: 1\nChain ID: 1\nNonce: Px7Nh1RPzlCLwqgOb\nIssued At: 2022-11-30T10:20:00.262Z","signature":"0xa8f89a58bf9b433d3100f9e41ee35b5e31fb8c7cd62547acb113162ec6f2e4140207e2dfbd4e387e1801ebc7f08a9dd105ac1d22b2e2ff0df5fa8b6d9bdcfe491c"}', 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', 'Content-Type' => 'application/json', ],]);echo $response->getBody();Response Example201 The token to be used to call the third party API from the client{ "id": "fRyt67D3eRss3RrX", "domain": "defi.finance", "statement": "Please confirm", "uri": "https://defi.finance/", "expirationTime": "2020-01-01T00:00:00.000Z", "notBefore": "2020-01-01T00:00:00.000Z", "resources": [ "" ], "version": "1.0", "nonce": "0x1234567890abcdef0123456789abcdef1234567890abcdef", "profileId": "0xbfbcfab169c67072ff418133124480fea02175f1402aaa497daa4fd09026b0e1", "chainId": 1, "address": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d", "publicKey": "0xfb2853744bb8afd58d9386d1856afd8e08de135019961dfa3a10d8c9bf83b99d"}