{
	"info": {
		"_postman_id": "8617136e-e13d-4ad9-a387-505eda67f845",
		"name": "OAuth Refresh or Revoke",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "7818095",
		"_collection_link": "https://quickpass-product.postman.co/workspace/Team-Workspace~159790bb-ecb0-4053-8ea0-624cb912a04d/collection/7818095-8617136e-e13d-4ad9-a387-505eda67f845?action=share&source=collection_link&creator=7818095"
	},
	"item": [
		{
			"name": "Refresh or Revoke oauth2",
			"item": [
				{
					"name": "revoke",
					"item": [
						{
							"name": "Revoke OAuth 2.0 Access or Refresh Token",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": [
										{
											"key": "token",
											"value": "ory_at_q5wBkUGLtBYtGS5VxCdrFoK8Iihh3bPs32SvTQMSN5A.dAPgwtsYU9HvbtxUbzYFpeySyfggC9lFlHiuFtGdYV4",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/x-www-form-urlencoded"
									},
									{
										"key": "Accept",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "token",
											"value": "access_token",
											"description": "(Required) "
										},
										{
											"key": "client_id",
											"value": "{your client ID}"
										}
									]
								},
								"url": {
									"raw": "{{baseUrl}}/oauth2/revoke",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"oauth2",
										"revoke"
									]
								},
								"description": "Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no\nlonger be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token.\nRevoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by\nthe client the token was generated for."
							},
							"response": [
								{
									"name": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201.",
									"originalRequest": {
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"value": "application/x-www-form-urlencoded"
											},
											{
												"key": "Authorization",
												"value": "Basic <credentials>",
												"description": "Added as a part of security scheme: basic"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "token",
													"value": "<string>",
													"description": "(Required) "
												},
												{
													"key": "client_id",
													"value": "<string>"
												},
												{
													"key": "client_secret",
													"value": "<string>"
												}
											]
										},
										"url": {
											"raw": "{{baseUrl}}/oauth2/revoke",
											"host": [
												"{{baseUrl}}"
											],
											"path": [
												"oauth2",
												"revoke"
											]
										}
									},
									"status": "OK",
									"code": 200,
									"_postman_previewlanguage": "text",
									"header": [],
									"cookie": [],
									"body": ""
								},
								{
									"name": "errorOAuth2",
									"originalRequest": {
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"value": "application/x-www-form-urlencoded"
											},
											{
												"key": "Accept",
												"value": "application/json"
											},
											{
												"key": "Authorization",
												"value": "Basic <credentials>",
												"description": "Added as a part of security scheme: basic"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "token",
													"value": "<string>",
													"description": "(Required) "
												},
												{
													"key": "client_id",
													"value": "<string>"
												},
												{
													"key": "client_secret",
													"value": "<string>"
												}
											]
										},
										"url": {
											"raw": "{{baseUrl}}/oauth2/revoke",
											"host": [
												"{{baseUrl}}"
											],
											"path": [
												"oauth2",
												"revoke"
											]
										}
									},
									"status": "Internal Server Error",
									"code": 500,
									"_postman_previewlanguage": "json",
									"header": [
										{
											"key": "Content-Type",
											"value": "application/json"
										}
									],
									"cookie": [],
									"body": "{\n  \"error\": \"<string>\",\n  \"error_debug\": \"<string>\",\n  \"error_description\": \"<string>\",\n  \"error_hint\": \"<string>\",\n  \"status_code\": \"<long>\"\n}"
								}
							]
						}
					]
				},
				{
					"name": "token",
					"item": [
						{
							"name": "The OAuth 2.0 Token Endpoint",
							"request": {
								"auth": {
									"type": "noauth"
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/x-www-form-urlencoded"
									},
									{
										"key": "Accept",
										"value": "application/json"
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "grant_type",
											"value": "refresh_token",
											"description": "Type of token"
										},
										{
											"key": "client_id",
											"value": "{your client ID}",
											"description": "Refer to login response"
										},
										{
											"key": "refresh_token",
											"value": "{your refresh token}",
											"description": "Refresh token from login response"
										}
									]
								},
								"url": {
									"raw": "https://us.getquickpass.com/oauth2/token",
									"protocol": "https",
									"host": [
										"us",
										"getquickpass",
										"com"
									],
									"path": [
										"oauth2",
										"token"
									]
								},
								"description": "Use open source libraries to perform OAuth 2.0 and OpenID Connect\navailable for any programming language. You can find a list of libraries here https://oauth.net/code/\n\nThe Ory SDK is not yet able to this endpoint properly."
							},
							"response": [
								{
									"name": "oAuth2TokenExchange",
									"originalRequest": {
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"value": "application/x-www-form-urlencoded"
											},
											{
												"key": "Accept",
												"value": "application/json"
											},
											{
												"key": "Authorization",
												"value": "Basic <credentials>",
												"description": "Added as a part of security scheme: basic"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "grant_type",
													"value": "<string>",
													"description": "(Required) "
												},
												{
													"key": "client_id",
													"value": "<string>"
												},
												{
													"key": "code",
													"value": "<string>"
												},
												{
													"key": "redirect_uri",
													"value": "<string>"
												},
												{
													"key": "refresh_token",
													"value": "<string>"
												}
											]
										},
										"url": {
											"raw": "{{baseUrl}}/oauth2/token",
											"host": [
												"{{baseUrl}}"
											],
											"path": [
												"oauth2",
												"token"
											]
										}
									},
									"status": "OK",
									"code": 200,
									"_postman_previewlanguage": "json",
									"header": [
										{
											"key": "Content-Type",
											"value": "application/json"
										}
									],
									"cookie": [],
									"body": "{\n  \"access_token\": \"<string>\",\n  \"expires_in\": \"<long>\",\n  \"id_token\": \"<string>\",\n  \"refresh_token\": \"<string>\",\n  \"scope\": \"<string>\",\n  \"token_type\": \"<string>\"\n}"
								},
								{
									"name": "errorOAuth2",
									"originalRequest": {
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"value": "application/x-www-form-urlencoded"
											},
											{
												"key": "Accept",
												"value": "application/json"
											},
											{
												"key": "Authorization",
												"value": "Basic <credentials>",
												"description": "Added as a part of security scheme: basic"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "grant_type",
													"value": "<string>",
													"description": "(Required) "
												},
												{
													"key": "client_id",
													"value": "<string>"
												},
												{
													"key": "code",
													"value": "<string>"
												},
												{
													"key": "redirect_uri",
													"value": "<string>"
												},
												{
													"key": "refresh_token",
													"value": "<string>"
												}
											]
										},
										"url": {
											"raw": "{{baseUrl}}/oauth2/token",
											"host": [
												"{{baseUrl}}"
											],
											"path": [
												"oauth2",
												"token"
											]
										}
									},
									"status": "Internal Server Error",
									"code": 500,
									"_postman_previewlanguage": "json",
									"header": [
										{
											"key": "Content-Type",
											"value": "application/json"
										}
									],
									"cookie": [],
									"body": "{\n  \"error\": \"<string>\",\n  \"error_debug\": \"<string>\",\n  \"error_description\": \"<string>\",\n  \"error_hint\": \"<string>\",\n  \"status_code\": \"<long>\"\n}"
								}
							]
						}
					]
				}
			]
		}
	],
	"variable": [
		{
			"key": "baseUrl",
			"value": "/"
		}
	]
}