{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"f82d0a6d-b682-4d24-aa0f-19998e8d1107","name":"Stellar External API","description":"This documents the V3 API for the Stellar Library platform.\n\n# Authentication\nAuthentication is done using OAuth 2.0.\n\nThere are two ways to get an Access Token for use with the API:\n\n - [Authorization Code grant](https://tools.ietf.org/html/rfc6749#section-4.1)\n - [Client Credentials grant](https://tools.ietf.org/html/rfc6749#section-4.4)\n\n## Authorization Code Grant\n\nThis is the primary workflow to authorize users for your app:\n\n1. Users are redirected to request access to their Stellar Library account.\n2. Users are redirected back to your site by Stellar Library.\n3. Your app accesses the Stellar Library API with the user's access token.\n4. Your app refreshes the user's access token using the refresh token as required.\n\n### 1. Request access to a user's Stellar Library account\n\n```GET https://manager.stellarlibrary.com/oauth2/authorize```\n\nRedirect your users to the [Authorize](#654fba14-293c-428a-b42c-f72ac6633c6b) URL with the correct URL parameters.\n\n### 2. Users are redirected back to your site by Stellar Library\n\nIf the user accepts your request, Stellar Library redirects back to your site with a temporary code in a `code` parameter as well as the state you provided in the previous step in a `state` parameter. If the states don't match, the request was created by a third party and the process should be aborted.\n\nExchange this `code` for an access token using the [following endpoint](#3e22f527-7b00-4e7a-a2ea-720a0c11e50e):\n\n```POST https://manager.stellarlibrary.com/oauth2/token```\n\n### 3. Use the access token to access the API\n\nThe access token allows you to make requests to the API on behalf of a user.\n\nYou must pass the access token in the Authorization header as shown below:\n\n```Authorization: Bearer OAUTH-ACCESS-TOKEN```\n\n## Client Credentials Grant\n\nThe Client Credentials Grant can be used to allow access by Systems or Systems on behalf of a User.\nClient Credentials will be provided to you by Stellar Library.\n\n```POST https://manager.stellarlibrary.com/oauth2/token```\n\nClient Credentials must be provided in the body of the request and will be exchanged for an access token. You must pass the access token in the Authorization header on subsequent requests as shown below:\n\n```Authorization: Bearer OAUTH-ACCESS-TOKEN```\n\n\n# Error Codes\nAPI methods use HTTP Response Codes to indicate what went wrong.\nFor 4XX errors, the response body should be a JSON object of the form \n\n```javascript\n{\n\terror: \"Error information here\",\n\terror_type: 'Optional error type'\n}\n```\n\nPlus any other relevant information. If you find an error that does not conform to this pattern, contact the Stellar team.\n\nFor 5XX errors there will be no extra information added.\n\n## Authorization Errors\n\nAuthorization errors will be of several types (represented by the `error_type` field in the error response):\n\n* `TOKEN_NO_ACCESS`: The access token given does not have access to the requested resource.\n* `TOKEN_EXPIRED`: The access token given has expired and a new access token should be requested using the refresh token.\n* `TOKEN_ERROR_GENERAL` or no `error_type`: Something else is wrong with your token, or you failed to pass one.\n","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"4970038","team":2672003,"collectionId":"f82d0a6d-b682-4d24-aa0f-19998e8d1107","publishedId":"S11Lsxc8","public":true,"publicUrl":"https://api.docs.stellarlibrary.com","privateUrl":"https://go.postman.co/documentation/4970038-f82d0a6d-b682-4d24-aa0f-19998e8d1107","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.0","publishDate":"2019-03-06T02:25:54.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Live","id":"6ca412c2-846c-47c4-bdc6-87a76c94a391","owner":"4970038","values":[{"key":"STELLAR_ROOT","value":"https://manager.stellarlibrary.com/","enabled":true},{"key":"REDIRECT_URI","value":"http://localhost:3000/","enabled":true},{"key":"CLIENT_ID","value":"AAAAAA","enabled":true},{"key":"CLIENT_SECRET","value":"BBBBBB","enabled":true},{"key":"LAST_AUTH_CODE","value":"CCCCC","enabled":true},{"key":"LAST_REFRESH_TOKEN","value":"DDDDDD","enabled":true},{"key":"X-Stellar-Token","value":"e04e1912-66cc-4bfa-acb4-1848b647eb56:940587c1-b961-11ed-8e39-0a58a9feac02","enabled":true},{"key":"EXAMPLE_DC_PATH","value":"RzmB/46mB/r0BD/f4ED","enabled":true}],"published":true}],"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/101f46a23d3749f2887b49f0590cd321f8cf67a54cbb069f4db01d371d93216e","favicon":"https://stellarlibrary.com/favicon.ico"},"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"},{"label":"Live","value":"4970038-6ca412c2-846c-47c4-bdc6-87a76c94a391"}],"canonicalUrl":"https://api.docs.stellarlibrary.com/view/metadata/S11Lsxc8"}