Authorization

You need to authorize all HTTP request to access this API, to authorize it you must login using Alkamedia oAuth with these credentials

  • Host :

    • dev : https://dev-akun.alkamedia.id/auth

    • production: https://akun.alkamedia.id/auth

  • Query Params :

    • appId : your app ip from previous step

    • redirectTo : redirect url after login

After success login, you will be redirected to {you-redirect-url}?authToken={code}, and then you need to exchange using this endpoint below.

Exchange user token

post
/v1/authorizer/token/exchange

Exchange user token

Body
scopesstring[]Optional

scopes for apps

secretstringOptional

app secrets

Example: ab89d3...
codestringOptional

Generated code from Alkamedia login

Example: 2d3d73....
idstringOptional

App id

Example: 62094....
Responses
post
/v1/authorizer/token/exchange
POST /v1/authorizer/token/exchange HTTP/1.1
Host: services.alkamedia.id
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "scopes": [
    "text"
  ],
  "secret": "ab89d3...",
  "code": "2d3d73....",
  "id": "62094...."
}
200

Response

{
  "status": true,
  "data": {
    "token": "N95RxRTZHWUsaD6H:8845959.....",
    "expiry": "2024-08-14T05:34:35"
  },
  "message": "success"
}

access token will expire in 24 hours after generated, once access token expired, you can regenerate access token with this http request again.

To secure your request, you need to include an "Authorization" header with the token generated from the endpoint above as its value.

Last updated