Each request requires a Bearer Token to be able to connect to Telegent API. Telegent will provide you your unique AccountKey and Secret.
Token expires after a few minutes and is allowed only for the intended API-Endpoint.
| Url : |
https://api.telegent.com/v1.0/oauth2/tokens
|
| Payload : |
{
"AccountKey": "{{Distributor_ID}}",
"AccountSecret": "{{Secret}}",
"ApiEndpoint": "https://api.telegent.com/v1.0/messages/outbound"
}
|
| Response: |
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1ltcy9uYW1laWRlbnhYy0zZj....",
"successful": true,
"tokenExpiry": "01/24/2025 08:06:57 PM",
"error": ""
}
|
| Http Status Code | Description |
|---|---|
| 200 Ok |
The request has succeeded. The information returned with the response is dependent on the method used in the request, for example:
|
| 400 Bad Request | The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. |
| 403 Forbidden | The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference. |
| 404 Not Found | The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. |
| 405 Method Not Allowed | The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource. |
| 409 Conflict | The request could not be completed due to a conflict with the current state of the resource. For example, when POSTing a new User and the email used already exist on the User's table.' |
| 415 Unsupported Media Type | The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method. |
| 500 Internal Server Error | The server encountered an unexpected condition which prevented it from fulfilling the request. |