{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"1834fb4f-5096-4a06-aa24-5ee85cc6b9a5","name":"ares","description":"The ares API exposes the entire ares infrastructure via a standardized programmatic interface. Using the ares API, you can do just about anything you can do on ares arena, while using your programming language of choice. The ares API is a RESTful API based on HTTP requests and JSON responses.\n\nThis version of the API, version 1, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via HTTPS. It also means that you need to register your application, even if you aren't allowing users to login.\n\nThe easiest way to start using the ares API is by clicking the Run in Postman button above. Postman is a free tool which helps developers run and debug API requests, and is the source of truth for this documentation. Every endpoint you see documented here is readily available by running our Postman collection.\n  \n\t\n# Client SDKs\nClient SDKs help you to quickly integrate the ares API into your application without the need to go into the details of the API documentation below. Following a list of official client SDKs:\n* [Javascript / browser](https://www.npmjs.com/package/@ares-dev/client-nodejs)\n* [Javascript / nodejs](https://www.npmjs.com/package/@ares-dev/client-nodejs)\n* [Typescript / browser + angular](https://www.npmjs.com/package/@ares-dev/client-nodejs)\n* [Typescript / nodejs](https://www.npmjs.com/package/@ares-dev/client-nodejs)\n\n\n# Register Application\nRegister your application to receive a `client_id` and `client_secret` for authentication with the ares API.\n\n> There are cases where its not possible to securely store a client secret, e.g. for mobile or desktop applications. In such situations you may register your application as a *public* client without a secret. This only works for the [**Authorization Code** flow](#f4f37762-a542-4d3d-b170-96e9a4a32554).\n\n1. [Register](https://d3ob2g5ep10o1o.cloudfront.net/settings/api) your application.\n\n\t![Register Application 1/2](https://d3ob2g5ep10o1o.cloudfront.net/doc/image/io-arestech-arena-api-auth-register-application-1-2.png \"Register Application 1/2\")\n2. The field `Redirect URIs` must contain all callback/redirect URIs you want to use during oauth2 authorization requests. Specifying a `redirect_uri` for an authorization request that is not contained in this whitelist will cause an error. The `redirect_uri` is used to detemine where the user gets redirected to after confirming or dismissing an authorization request. \n\n\t![Register Application 2/2](https://d3ob2g5ep10o1o.cloudfront.net/doc/image/io-arestech-arena-api-auth-register-application-2-2.png \"Register Application 2/2\")\n3. Copy & securely store provided `client_id` and `client_secret`. You will not be able to recover the `client_secret` later on.\n  \n  \n# Authorize Application - Postman\n\n1. [Download](https://www.getpostman.com/) Postman and click the Run in Postman button at the top of this page. This will load our collection of endpoints into Postman for easy debugging.\n\n\t![Authorize Application - Postman 1/2](https://d3ob2g5ep10o1o.cloudfront.net/doc/image/io-arestech-arena-api-auth-authorize-application-postman-1-2.png \"Authorize Application - Postman 1/2\")\n2. Edit the imported ares collection and open the **Authorization** tab.\n\n\t![Authorize Application - Postman 2/2](https://d3ob2g5ep10o1o.cloudfront.net/doc/image/io-arestech-arena-api-auth-authorize-application-postman-2-2.png \"Authorize Application - Postman 2/2\")\n3. Click **Get New Access Token** and fill fields of presented dialog as follows:\n\t* **Grant Type** *Client Credentials*\n\t* **Access Token URL** `https://fad7177qfa.execute-api.eu-central-1.amazonaws.com/alpha/auth/token`\n\t* **Client ID** *Your Client ID*\n\t* **Client Secret** *Your Client Secret*\n\t* **Scope** `identity account owner`\n\t* **Client Authentication** *Send as Basic Auth header*\n4. Confirm by clicking **Request Token** and **Use Token** on the following screen.\n  \n  \n# Authorize Application - Swagger\n\nAlternatively you may use our hosted [Swagger UI](https://d3ob2g5ep10o1o.cloudfront.net/doc/api/public/index.html) to try out the ares API. Simply click the **Authorize** button on top of the page and enter your *Client ID* and *Client Secret*.\n  \n  \n# Authorize Application - Custom\n\nThe ares API offers two oauth2 flows to authorize your own applications:\n* [**Authorization Code** flow](#f4f37762-a542-4d3d-b170-96e9a4a32554) Request authorization for your application from another user. For example to make requests with limited permissions on behalf of that user.\n\n* [**Client Credentials** flow](#7841a69d-1fe0-46bc-b297-8ed3d0c82af6) Authorize your application to act as the user that registered the application and generated corresponding *Client ID* and *Client Secret*.\n  \n  \n# Access Token\n\nNo matter what authorization flow you choose, if all goes well you end up with an access token. The ares API is designed to be stateless. Consequently all session & authorization related information is embedded in the access token encoded as a JSON Web Token [[JWT](https://jwt.io/)].\n\nAn ares API access token consists of a header, a body and a signature separated by dots. Typically resulting in something similar to this (w/o linebreaks):\n\t\n```\neyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9\n.\neyJzdWIiOiJkNjNkNmJjNGNkN2E3ODllMjNiNTY1MDM4MzgwNTMwZDE2OWVmNWZiMDQ3Zjhh\nZmMxMWVkNzk2ZiIsImlhdCI6MTU0MDM4MjQ1NSwiZXhwIjoxNTQwMzg2MDU1LCJhdWQiOiJm\nNmFmM2QwMC1kNzgyLTExZTgtOTZjNi0xM2I3NjlmNTdhMDYiLCJwcnYiOnsidmFsdWVzIjp7\nImFjY291bnQiOnsidHlwZSI6Im1haWwiLCJ2YWx1ZSI6ImNhcnN0ZW4uc2NoaXBrZUBnbWFp\nbC5jb20ifSwiaWRlbnRpdHkiOnsiZXRoIjoiMHg0MzVkMDRjOTI5MmVhNWZhMDk2ZWQwYmUz\nOTVlMmM0ZTExNDQ2MzFlIiwiYmRiIjoiOU5RMndyQ1ZmeERqUE5jOEFnMkRvVnF0SjV5blBO\nU3NLeXBVU0ZiUkxIZXQifSwib3duZXIiOnt9fSwic2NvcGVzIjpbImlkZW50aXR5IiwiYWNj\nb3VudCIsIm93bmVyIl19fQ\n.\nPbK0Uysqh5qWS_Z9gT3VIYYb_sh0Y4oAVlamgROLfAjG-AO7kYMrTPRjQ5LUWKR88zwvxUwJ\n4Q1ssk-Dy4J66IX-2nrvbcHiQv0E4IQW3v3hXZGVQQJfMsehdKrKK-TbFSTihVD-4v8N_MDZ\nunLlDUpKywFl1t-D_FqA3jzCKQE\n```\n\t\n* The header contains information about token type and utilised signature algorithm.\n* The body is a regular base64 encoded JSON string, containing useful information for both ares API nodes as well as API clients / applications:\n\n\t```\n\t{\n\t\t\"sub\": \"d9c2f9bd48a1e60539ff6fe6e25c501c103f5d93a90a3f5221b2734a\",\n\t\t\"aud\": \"arena\",\n\t\t\"prv\": {\n\t\t\t\"values\": {\n\t\t\t\t\"identity\": {\n\t\t\t\t\t\"bdb\": \"6HsAoGSkTFyJeQqVyd2Es9RNNyzpTZ1t54j9KRFWsUo\",\n\t\t\t\t\t\"eth\": \"0xea4ba38cf229f7bd8a5b99daea3914cf16899eed\"\n\t\t\t\t},\n\t\t\t\t\"account\": {\n\t\t\t\t\t\"type\": \"mail\",\n\t\t\t\t\t\"value\": \"carsten@arestech.io\"\n\t\t\t\t},\n\t\t\t\t\"owner\": {}\n\t\t\t},\n\t\t    \"scopes\": [\n\t\t    \t\"identity\",\n\t\t    \t\"account\",\n\t\t    \t\"owner\"\n\t\t    ]\n\t\t},\n\t\t\"iat\": 1539333731,\n\t\t\"exp\": 1539337331\n\t}\n\t```\n\t\t\n\t* **sub** Unique identifier of authenticated user\n\t* **aud** Application / client authorized to use this token\n\t* **prv** Payload containing additional information based on authorized scopes as well as an enumeration of the authorized scopes. `identity` contains associated blockchain identities, i.e. public keys / addresses. `account` contains the email address or mobile number the user used to register. `owner` currently merely acts as a placeholder. If a certain scope is not given or authorized, corresponding field in payload is encrypted.\n\t* **iat** Issued at\n\t* **exp** Expires at\n\t\n* The signature provides ares API nodes and clients a way to ensure that the token has not been tampered with.\n\t\n\t","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5572603","team":190319,"collectionId":"1834fb4f-5096-4a06-aa24-5ee85cc6b9a5","publishedId":"RWgqUHvV","public":true,"publicUrl":"https://documenter-api.postman.tech/view/5572603/RWgqUHvV","privateUrl":"https://go.postman.co/documentation/5572603-1834fb4f-5096-4a06-aa24-5ee85cc6b9a5","customColor":{"top-bar":"F8F8F8","right-sidebar":"303030","highlight":"7400A4"},"documentationLayout":"classic-double-column","version":"8.11.6","publishDate":"2018-11-08T17:02:22.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/6d763aaa55a3813221f6bb5bde1cba01dccacd925e34d705779ee12c65748c35","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/RWgqUHvV"}