Generate Access Token
GEThttps://api.cleverhub.co/api/v1/payment_gateways/access_token
Generate a temporary access token to authenticate and initiate transactions through the Hello Clever payment gateway. This token is obtained using your app-id and secret-key credentials and is valid for 3600 seconds (1 hour).
Responses
- 200
- 400
- 401
Access token generated successfully.
- application/json
- Schema
- Example (auto)
Schema
access_tokenstring
A token used to authenticate payment requests. Expires after 3600 seconds.
Example:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
expires_ininteger
Duration in seconds before the token expires.
Example:
3600
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600
}
Bad Request
Unauthorized
Authorization: app-id
name: app-idtype: apiKeyin: headerdescription: A unique identifier assigned to each application.
name: secret-keytype: apiKeyin: headerdescription: A secure token associated with the `app-id`.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.cleverhub.co/api/v1/payment_gateways/access_token");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear