Header Params
| Name |
Type |
Required? |
Description |
| Authentication |
Bearer <token> |
Yes |
Use your API secret as the token in the hader, use only https |
URL Params
Parameters should be sent as x-www-form-urlencoded.
| Name |
Type |
Required? |
Example Value |
Description |
| app_id |
uuid |
Yes |
APPX-ABC123456 |
The id of the application that has been created in the platform |
| client_id |
uuid |
Yes |
CLNT-ABC123456 |
The id that represents your account |
| token |
string |
Yes |
TOKN-f1d55033-5759-45b1-9904-38282b46ffc0-rkmXm9VgLM |
The success token that OnlyAuth has generated |
Responses
|
Response Type |
Response Body |
| 200 |
application/json |
{ |
| "token": { |
|
|
| "end_user_uuid": "1", |
|
|
| "end_user_phone_number": "+14151002000", |
|
|
| "timestamp": 1700393197 |
|
|
| } |
|
|
| } |
|
|
| 400 |
application/json |
{ |
| "error": "Invalid Request", |
|
|
| "errors": [ |
|
|
| "'app_id' is required.", |
|
|
| "'token' is required." |
|
|
| ] |
|
|
| } |
|
|
| 401 |
application/json |
{ |
| "error": "Invalid auth token." |
|
|
| } |
|
|
Code Examples
Request
import requests
url = "https://api-dev.uauth.co/server/success-tokens/new?token=TOKN-f1d55033-5759-45b1-9904-38282b46ffc0-rkmXm9VgLM&client_id=CLNT-841305dd-d7de-420d-8b6c-371acbfedd36&app_id=APPX-3582f876-b145-45a9-986c-f2a"
payload = {}
headers =
'Authorization': 'Bearer 2b50934504a192dee3ed52a8e20392de9edfc780ac98'
}
response = requests.request("GET", url, headers=headers, data=payload)
token = response.json().get('token')
end_user_uuid = token['end_user_uuid']
end_user_phone_number = token['end_user_phone_number']