fierce-toothbrush-41957
04/01/2022, 12:06 PMdamp-sunset-69236
04/01/2022, 12:20 PMfierce-toothbrush-41957
04/01/2022, 12:23 PMfierce-toothbrush-41957
04/01/2022, 12:23 PMdamp-sunset-69236
04/01/2022, 12:26 PMdamp-sunset-69236
04/01/2022, 12:26 PMdamp-sunset-69236
04/01/2022, 12:29 PMOryClient.configure do |config|
config.host = 'your_project_url'
end
might helpfierce-toothbrush-41957
04/01/2022, 12:45 PMOryClient.configure do |config|
config.access_token = 'Personal_Access_Token'
config.host = 'My_Project_Url'
end
I tried already, but didn't get result
HTTP status code: 401
Response headers: {"Date"=>"Fri, 01 Apr 2022 095429 GMT", "Content-Type"=>"application/json", "Content-Length"=>"186", "Connection"=>"keep-alive", "cache-control"=>"private, no-cache, no-store, must-revalidate", "vary"=>"Origin,Cookie", "CF-Cache-Status"=>"DYNAMIC", "Expect-CT"=>"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", "Set-Cookie"=>"__cflb=0pg1RbZMZcQY6KwtZw8ZHrqdVBkfNrHJsczBvGfV; SameSite=None; Secure; path=/; expires=Fri, 01-Apr-22 105429 GMT; HttpOnly", "Server"=>"cloudflare", "CF-RAY"=>"6f507192aa59f55d-SEA", "alt-svc"=>"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"}
Response body: {"error":{"code":401,"status":"Unauthorized","request":"9fd4c275-2ca9-98ca-b1a7-a205a5175aa9","reason":"No valid session cookie found.","message":"The request could not be authorized"}}
ETHON: performed EASY effective_url=https://playground.projects.oryapis.com/sessions/whoami response_code=401 return_code=ok total_time=0.75955
Error when calling V0alpha2Api->to_session_with_http_info: Error message: the server returns an errorfierce-toothbrush-41957
04/04/2022, 8:43 AMdamp-sunset-69236
04/04/2022, 10:34 AMdamp-sunset-69236
04/04/2022, 10:35 AMory_session_projectidwithouthypens
fierce-toothbrush-41957
04/04/2022, 10:38 AMdamp-sunset-69236
04/04/2022, 10:40 AMrequest.cookies
they’re stored theredamp-sunset-69236
04/04/2022, 10:41 AMimport time
import ory_client
from ory_client.api import v0alpha2_api
from ory_client.model.json_error import JsonError
from ory_client.model.session import Session
from pprint import pprint
# Defining the host is optional and defaults to <https://playground.projects.oryapis.com>
# See configuration.py for a list of all supported configuration parameters.
configuration = ory_client.Configuration.get_default_copy()
configuration.host = "<https://auth.gen1us2k.com>"
# Enter a context with an instance of the API client
cookie ="ory_session_lovingturinguo2cv9nlhi=value=="
with ory_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = v0alpha2_api.V0alpha2Api(api_client)
# example passing only required values which don't have defaults set
# and optional values
try:
# Check Who the Current HTTP Session Belongs To
api_response = api_instance.to_session(cookie=cookie)
pprint(api_response)
except ory_client.ApiException as e:
print("Exception when calling V0alpha2Api->to_session: %s\n" % e)
damp-sunset-69236
04/04/2022, 10:41 AMfierce-toothbrush-41957
04/04/2022, 10:42 AMfierce-toothbrush-41957
04/04/2022, 10:43 AMopts = {
x_session_token: nil,
cookie: request.env['HTTP_COOKIE']
}
I used the cookie from requestdamp-sunset-69236
04/04/2022, 12:23 PMdamp-sunset-69236
04/04/2022, 12:26 PMfierce-toothbrush-41957
04/04/2022, 12:34 PMfierce-toothbrush-41957
04/04/2022, 12:35 PMdamp-sunset-69236
04/04/2022, 12:53 PMfierce-toothbrush-41957
04/04/2022, 12:54 PMdamp-sunset-69236
04/04/2022, 12:55 PMfierce-toothbrush-41957
04/04/2022, 1:00 PMfierce-toothbrush-41957
04/04/2022, 1:00 PMdamp-sunset-69236
04/04/2022, 1:12 PMdamp-sunset-69236
04/04/2022, 1:13 PMdamp-sunset-69236
04/04/2022, 1:14 PMdamp-sunset-69236
04/04/2022, 1:17 PMfierce-toothbrush-41957
04/04/2022, 1:24 PMfierce-toothbrush-41957
04/04/2022, 5:26 PMfierce-toothbrush-41957
04/05/2022, 10:42 AMdamp-sunset-69236
04/05/2022, 10:52 AMsessions/whoami
using http client of your choicefierce-toothbrush-41957
04/05/2022, 11:35 AMdamp-sunset-69236
04/05/2022, 11:36 AMsessions/whoami
3. Rundamp-sunset-69236
04/05/2022, 11:36 AMfierce-toothbrush-41957
04/05/2022, 11:37 AMlittle-farmer-9523
04/05/2022, 11:38 AMfierce-toothbrush-41957
04/07/2022, 9:54 AM