{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ebbe8a4a-b005-f261-1f23-8901f2e5278f","name":"Space v1","description":"Super Cool Space Collection\n===\n\nThis is a sample collection and environment for the tutorial outlined in [Not your Grandma's Postman](http://blog.getpostman.com/2017/05/27/not-your-grandmas-postman/).\n\nRetrieve the **Astronomy Pic of the Day from NASA**, get an Imgur auth token, and then post the picture to **Imgur**.\n\n[![beautiful space pic](https://apod.nasa.gov/apod/image/1705/M101p2000bagi.jpg)](https://apod.nasa.gov/apod/image/1705/M101p2000bagi.jpg)\n\nIf you haven't already, click the Run in Postman button to get the collection and environment into your Postman app. In the Postman app, you should now see this collection in the sidebar to the left, and this environment selected in the dropdown in the top right.\n\n[![download Space collection](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/importSpace1.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/importSpace1.png)\n\nTo get started:\n===\n1. **Register an Imgur app:** \n\n  Head to Imgur and [register a new application](https://api.imgur.com/oauth2/addclient). Select OAuth 2 authorization with a callback URL, and add the following Authorization callback URL - `https://www.getpostman.com/oauth2/callback`.\n  \n  Make a note of your Imgur app's `Client ID` and `Client secret`. \n  \n  [![imgur client id](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurClientSecret_censored.jpg)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurClientSecret_censored.jpg) \n\n2. **Add your Imgur credentials to Postman:**\n\n  In the Postman app, head to the **Quick Look** icon in the top right to view your variables. Click the **Edit** link.\n  \n  [![quick look icon](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurQuickLook.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurQuickLook.png)\n  \n  Update the `imgurClientId` and `imgurClientSecret` values with your own, and hit **Update**.\n\n  [![update environment variable](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurEnv.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurEnv.png) \n\n3. **Get an auth token from Imgur:** \n  \n  We will use [Imgur's OAuth 2.0 process](https://apidocs.imgur.com/#authorization-and-oauth) to get a refresh token. \n\n  In the Postman app, under a new request, click on the **Authorization** tab, select OAuth 2.0, click on the **Get New Access Token** button, and fill in these values:\n    - Token Name: can be anything\n    - Auth URL: `https://api.imgur.com/oauth2/authorize`\n    - Access Token URL: `https://api.imgur.com/oauth2/token`\n    - Client ID: {{imgurClientId}}\n    - Client Secret: {{imgurClientSecret}}\n    - Grant Type: Authorization Code\n    - Request access token locally: checked\n  \n  [![Postman OAuth 2.0](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurAccessTokenModal.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurAccessTokenModal.png) \n\n  Click on **Request Token** to initiate the OAuth 2.0 flow authorizing the Postman app to connect to your Imgur account.\n  \n  [![Imgur Oauth](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurOauth.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurOauth.png) \n  \n  Once that is completed, add the `refresh_token` value to your environment under the `imgurRefreshToken` key, the same way you added your Imgur credentials to Postman in Step 2.\n   \n  [![Imgur refresh token](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/refreshTokenOauth.jpg)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/refreshTokenOauth.jpg) \n\n4. **Run the collection:** \n\n  Click on the right angle bracket (**>**) next to the collection to open the collection details flyout, and click the blue **Run** button.\n\n  [![collection details](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurRunSpaceCollection.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/imgurRunSpaceCollection.png)\n\n  This will open the collection runner in a separate window. Verify that the correct collection and environment is selected in the respective dropdowns, and then click the **Start Run** button.\n\n  [![collection runner](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/collection_runner2.png)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/collection_runner2.png)\n\n  In the collection runner, watch your tests running (and hopefully passing). If all goes well, your picture has been posted privately to Imgur under your account.\n  \n  [![collection runner gif](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/collectionRunner2.gif)](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/collectionRunner2.gif)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1559979","team":34425,"collectionId":"ebbe8a4a-b005-f261-1f23-8901f2e5278f","publishedId":"6YwzFwT","public":true,"publicUrl":"https://documenter-api.postman.tech/view/1559979/6YwzFwT","privateUrl":"https://go.postman.co/documentation/1559979-ebbe8a4a-b005-f261-1f23-8901f2e5278f","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2017-05-17T00:39:42.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"spacev1.template","id":"d9fce555-e6f5-a28d-0b5d-321b0925620f","owner":"1559979","values":[{"enabled":true,"key":"imgurClientId","value":"paste-your-own-imgur-clientId-here","type":"text"}],"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/727d82ed2a92024979cf3c8bdf3e58fcdaa4d174e5c4952e61d2f0c0f509d2ab","favicon":"https://res.cloudinary.com/postman/image/upload/v1596840814/team/xwdfwfemtw5dpc0im405.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":"spacev1.template","value":"1559979-d9fce555-e6f5-a28d-0b5d-321b0925620f"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/6YwzFwT"}