API
Complete a PKCE OAuth flow and issue session tokens
GET
/auth/oauth/{provider}/callback
const url = 'https://mw.omazy.ai/api/v1/auth/oauth/example/callback';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://mw.omazy.ai/api/v1/auth/oauth/example/callbackParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”provider
required
string
Provider name (google, apple)
Query Parameters
Section titled “Query Parameters”state
string
OAuth state token (or form field for Apple)
code
string
Authorization code (or form field for Apple)
Responses
Section titled “Responses”OK
Media typeapplication/json
object
data
error
object
code
string
message
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
success
boolean
data
object
tokens
object
access_token
string
refresh_token
string
user
object
auth_provider
string
created_at
string
email
string
first_name
string
id
string
is_anonymous
boolean
is_verified
boolean
last_login_at
string
last_name
string
location
Array<integer>
onboarding_completed
boolean
profile_image
string
role
string
user_type
string
Examplegenerated
{ "data": { "tokens": { "access_token": "example", "refresh_token": "example" }, "user": { "auth_provider": "example", "created_at": "example", "email": "example", "first_name": "example", "id": "example", "is_anonymous": true, "is_verified": true, "last_login_at": "example", "last_name": "example", "location": [ 1 ], "onboarding_completed": true, "profile_image": "example", "role": "example", "user_type": "example" } }, "error": { "code": "example", "message": "example" }, "meta": { "next_cursor": "example", "page": 1, "per_page": 1, "total": 1 }, "success": true}Bad Request
Media typeapplication/json
object
data
error
object
code
string
message
string
meta
object
next_cursor
string
page
integer
per_page
integer
total
integer
success
boolean
error
object
code
string
message
string
Examplegenerated
{ "data": "example", "error": { "code": "example", "message": "example" }, "meta": { "next_cursor": "example", "page": 1, "per_page": 1, "total": 1 }, "success": true}