{"info":{"_postman_id":"10fa030e-53b7-48d7-9bab-c6e351a04ebb","name":"Chat - oAuth authorization","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"8691322","collectionId":"10fa030e-53b7-48d7-9bab-c6e351a04ebb","publishedId":"TzJvdGrn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-04-21T14:40:28.000Z"},"item":[{"name":"Authorize","id":"1cbceddf-f850-471a-a460-63487dfd79f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"authorization_code\",\n    \"code\": \"tzE3bn6FXof3bMonzDfh6LgJFo9hhcyr\",\n    \"client_id\": \"{{vfOAuth2ClientId}}\",\n    \"client_secret\": \"{{vfOAuth2ClientSecret}}\",\n    \"redirect_uri\": \"https://google.com\" // optional\n}","options":{"raw":{"language":"json"}}},"url":"{{oAuthServerHost}}/authorize","urlObject":{"path":["authorize"],"host":["{{oAuthServerHost}}"],"query":[],"variable":[]}},"response":[{"id":"58ae1937-f977-42e7-9731-8cf2bca3ff29","name":"Authorize","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"authorization_code\",\n    \"code\": \"AUTHORIZATION_CODE_VALUE\",\n    \"client_id\": \"CLIENT_ID\",\n    \"client_secret\": \"CLIENT_SECRET\",\n    \"code_verifier\": \"CODE_VERIFIER_OPTIONAL\"\n}","options":{"raw":{"language":"json"}}},"url":"{{oAuthServerHost}}/authorize"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"ACCESS_TOKEN_VALUE\",\n    \"token_type\": \"bearer\",\n    \"refresh_token\": \"REFRESH_TOKEN_VALUE\",\n    \"expires_in\": 1800 // in seconds\n}"},{"id":"479b6c99-fb43-41e3-8ffe-9045d8a5ccf2","name":"Unauthorized","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"authorization_code\",\n    \"code\": \"authorization-code-value\",\n    \"client_id\": \"example-client-id\",\n    \"client_secret\": \"invalid-secret\"\n}","options":{"raw":{"language":"json"}}},"url":"{{oAuthServerHost}}/authorize"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorized\"\n}"}],"_postman_id":"1cbceddf-f850-471a-a460-63487dfd79f2"},{"name":"Refresh token","id":"29ef78e4-d3bc-4a8c-aebe-8d29ad45ab2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"refresh_token\",\n    \"refresh_token\": \"5en4F6hPUSraxBc4od0Y9vxYQUVd8NRS5yk3BJb1A86b0t7v1beEG4M8FfRuzs1J\",\n    \"client_id\": \"{{vfOAuth2ClientId}}\",\n    \"client_secret\": \"{{vfOAuth2ClientSecret}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{oAuthServerHost}}/refresh","urlObject":{"path":["refresh"],"host":["{{oAuthServerHost}}"],"query":[],"variable":[]}},"response":[{"id":"7cf4363f-a79d-499c-b05c-e2b83aee9c88","name":"Refresh token","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"grant_type\": \"refresh_token\",\n    \"refresh_token\": \"REFRESH_TOKEN_VALUE\",\n    \"client_id\": \"CLIENT_ID\",\n    \"client_secret\": \"CLIENT_SECRET\"\n}","options":{"raw":{"language":"json"}}},"url":"{{oAuthServerHost}}/refresh"},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"ACCESS_TOKEN_VALUE\",\n    \"refresh_token\": \"REFRESH_TOKEN_VALUE\", // optional\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 1800 // in seconds\n}"}],"_postman_id":"29ef78e4-d3bc-4a8c-aebe-8d29ad45ab2f"},{"name":"Me","id":"9f8388fc-3271-4684-bd8c-13d7f75e2102","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"{{oAuthServerHost}}/me","urlObject":{"path":["me"],"host":["{{oAuthServerHost}}"],"query":[],"variable":[]}},"response":[{"id":"6e6922d4-90c1-4b5a-b8d4-bfd7fd7fb608","name":"Me","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer ACCESS_TOKEN_VALUE","type":"text"}],"url":"{{oAuthServerHost}}/me"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": \"userIdValue\",\n        \"firstName\": \"John\", // optional\n        \"lastName\": \"Doe\" // optional\n    },\n    \"consumerCustomFields\": { // optional\n        \"consumerCustomFieldIdent\": \"consumerCustomFieldValue\",\n        \"other\": \"field\"\n    },\n    \"consumerContactCustomFields\": { // optional\n        \"consumerContactCustomFieldIdent\": \"consumerContactCustomFieldValue\",\n        \"other\": \"field\"\n    }\n}"}],"_postman_id":"9f8388fc-3271-4684-bd8c-13d7f75e2102"}]}