To retrieve an access token, POST a clientId
/clientSecret
combination to /v1/oauth/token
.
For example:
curl -X POST 'https://public.api.skilvul.com/v1/oauth/token' -d "clientId=YOUR_CLIENT_ID&clientSecret=YOUR_CLIENT_SECRET"
returns a response like:
{
"tokenType": "Bearer",
"accessToken": "aa9f3cdb7c5359d3621e58ee59c7feb31ec03da818d9a8dd939f3a8eff15e140",
"accessTokenExpiresAt": 1587448713231,
"refreshToken": "3fd78bb5eb4ce238701e16309e0c6f7d15d2b09bab40d3a7dd2eb4dd74d3dffr",
"refreshTokenExpiresAt": 1587448713231,
"error": null
}
Access tokens will expire, if an expired token is used a 403
status code will be returned.
The refresh token can be used to automatically renew an access token without requiring the password again (as long as the refresh token used is also not yet expired).
For example:
curl -X POST 'https://public.api.skilvul.com/v1/oauth/token/refresh' -d "clientId=YOUR_CLIENT_ID&refreshToken=YOUR_REFRESH_TOKEN"
If the refresh token has expired, you will need to generate a new one using /v1/oauth/token
.
Authenticate requests by including an Authorization header of type Bearer
.
For example:
curl 'https://public.api.skilvul.com/v1/products' -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
clientId required | string The Client ID provided by Skilvul. |
clientSecret required | string The Client Secret provided by Skilvul. |
{- "clientId": "YOUR_CLIENT_ID",
- "clientSecret": "YOUR_CLIENT_SECRET"
}
{- "tokenType": "Bearer",
- "accessToken": "aa9f3cdb7c5359d3621e58ee59c7feb31ec03da818d9a8dd939f3a8eff15e140",
- "accessTokenExpiresAt": 1587448713231,
- "refreshToken": "3fd78bb5eb4ce238701e16309e0c6f7d15d2b09bab40d3a7dd2eb4dd74d3dffr",
- "refreshTokenExpiresAt": 1587967113231,
- "error": null
}
clientId required | string The Client ID provided by Skilvul. |
refreshToken required | string The refresh token generated from |
{- "clientId": "YOUR_CLIENT_ID",
- "refreshToken": "YOUR_REFRESH_TOKEN"
}
{- "tokenType": "Bearer",
- "accessToken": "aa9f3cdb7c5359d3621e58ee59c7feb31ec03da818d9a8dd939f3a8eff15e140",
- "accessTokenExpiresAt": 1587448713231,
- "error": null
}
limit | integer Default: 10 |
offset | integer |
{- "bundles": [
- {
- "id": "ck108q0se017c9c824jwo4hid",
- "title": "Bundle ABC",
- "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "fullDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
- "price": 60000,
- "products": null,
- "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}
], - "totalBundles": 1,
- "error": null
}
{- "bundle": {
- "id": "ck108q0se017c9c824jwo4hid",
- "title": "Bundle ABC",
- "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "fullDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
- "price": 60000,
- "products": null,
- "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}, - "error": null
}
limit | integer Default: 10 |
offset | integer |
{- "products": [
- {
- "id": "ck108q0se017c0715zfh68162",
- "title": "Kelas ABC",
- "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "fullDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
- "type": "PATH",
- "price": 60000,
- "requiredCourses": null,
- "lessons": [
- {
- "order": 1,
- "title": "ABC"
}
], - "addOns": [
- {
- "id": "ck108q0se017c07031293kd09",
- "title": "Kelas ABC",
- "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "type": "BADGE",
- "price": 25000,
- "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}
], - "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}
], - "totalProducts": 1,
- "error": null
}
{- "product": {
- "id": "ck108q0se017c0715zfh68162",
- "title": "Kelas ABC",
- "shortDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "fullDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
- "type": "PATH",
- "price": 60000,
- "requiredCourses": null,
- "lessons": [
- {
- "order": 1,
- "title": "ABC"
}
], - "addOns": [
- {
- "id": "ck108q0se017c07031293kd09",
- "title": "Kelas ABC",
- "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "type": "BADGE",
- "price": 25000,
- "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}
], - "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}, - "error": null
}
{- "addOn": {
- "id": "ck108q0se017c07031293kd09",
- "title": "Kelas ABC",
- "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
- "type": "BADGE",
- "price": 25000,
- "lastUpdatedAt": "2020-04-29T16:56:16.158Z"
}, - "error": null
}
required | object |
bundleIds | Array of strings List of Bundle Ids to be purchased. |
productIds | Array of strings List of Product Ids to be purchased. |
addOnIds | Array of strings List of Add-on Ids to be purchased. |
{- "user": {
- "email": "jon.snow@winterfell.com",
- "firstName": "Jon",
- "lastName": "Snow",
- "gender": "MALE"
}, - "bundleIds": [
- "ck108q0se017c9c824jwo4hid"
], - "productIds": [
- "ck108q0se017c0715zfh68162"
], - "addOnIds": [
- "ck108q0se017c07031293kd09"
]
}
{- "user": {
- "id": "ck91czrpilaob001826psge4st",
- "email": "jon.snow@winterfell.com"
}, - "order": {
- "id": "string",
- "items": [
- {
- "id": "ck108q0se017c9c824jwo4hid",
- "title": "Bundle ABC",
- "price": 60000,
- "type": "BUNDLE"
}, - {
- "id": "ck108q0se017c0715zfh68162",
- "title": "Kelas ABC",
- "price": 60000,
- "type": "PRODUCT"
}, - {
- "id": "ck108q0se017c07031293kd09",
- "title": "Kelas ABC",
- "price": 25000,
- "type": "ADDON",
- "addOnType": "BADGE"
}
], - "totalAmount": 145000,
- "totalPayment": 0,
- "status": "COMPLETED",
- "createdAt": "2020-04-21T03:17:03.568Z"
}, - "orderSuccessUrl": "https://skilvul.com/uoc?t=9af6548240219d4058f1f558bdec86429accb18b73d3cc2ef09d729736e",
- "error": null,
- "errorBundleIds": [ ],
- "errorProductIds": [ ],
- "errorAddOnIds": [ ]
}
required | object |
bundleIds | Array of strings List of Bundle Ids to be purchased. |
productIds | Array of strings List of Product Ids to be purchased. |
addOnIds | Array of strings List of Add-on Ids to be purchased. |
{- "user": {
- "email": "jon.snow@winterfell.com",
- "firstName": "Jon",
- "lastName": "Snow",
- "gender": "MALE"
}, - "bundleIds": [
- "ck108q0se017c9c824jwo4hid"
], - "productIds": [
- "ck108q0se017c0715zfh68162"
], - "addOnIds": [
- "ck108q0se017c07031293kd09"
]
}
{- "user": {
- "id": "ck91czrpilaob001826psge4st",
- "email": "jon.snow@winterfell.com"
}, - "error": null,
- "errorBundleIds": [ ],
- "errorProductIds": [ ],
- "errorAddOnIds": [ ]
}
schoolGradeId required | string |
schoolTypeId | string |
provinceId required | string |
cityId | string |
search | string |
{- "schools": [
- {
- "id": "ck108q0se017c0715zfh68162",
- "name": "SD IT INSAN MADANI MEUKEK"
}
], - "totalSchools": 1,
- "error": null
}
{- "user": {
- "id": "ck108q0se017c0715zfh68162",
- "email": "john@mail.com",
- "firstName": "John",
- "lastName": "Doe",
- "isEmailVerified": false,
- "totalSkilPoin": 0,
- "skilBadge": [
- {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Web Development Pemula (Gold)",
- "openBadgeId": "d0l5r05nTZWetl98ijoXUQ",
}
], - "totalSkilBadge": 1,
- "totalCourse": 1,
- "totalCompletedCourse": 1,
- "totalPath": 1,
- "totalCompletedPath": 1,
- "gender": "MALE",
- "birthPlace": "Indonesia",
- "birthDate": "2020-11-10T00:00:00.000Z",
- "province": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Aceh"
}, - "city": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Kab. Aceh Selatan"
}, - "profession": "Pelajar (SMP)",
- "phone": 82111111111,
- "address": "Jl. Apel 1",
- "zipCode": "12345",
- "pictureUrl": "string",
- "school": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "SD IT INSAN MADANI MEUKEK",
- "grade": {
- "id": "ck108q0se017c0715zfh68162",
- "grade": "SD"
}, - "type": {
- "id": "ck108q0se017c0715zfh68162",
- "type": "Swasta"
}, - "province": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Aceh"
}, - "city": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Kab. Aceh Selatan"
}
}, - "otherSchool": { }
}, - "error": null
}
userId required | string |
firstName | string |
lastName | string |
gender | string Enum: "MALE" "FEMALE" "NOT_SPECIFIED" |
birthPlace | string |
birthDate | string |
provinceId | string Required if |
cityId | string Required if |
profession | string |
schoolId | string |
otherSchoolName | string or null Value: null If |
schoolGradeId | string Required if |
schoolTypeId | string |
schoolProvinceId | string Required if |
schoolCityId | string |
{- "firstName": "John",
- "lastName": "Doe",
- "gender": "MALE",
- "birthPlace": "Indonesia",
- "birthDate": "2020-11-10T00:00:00.000Z",
- "provinceId": "ck108q0se017c0715zfh68162",
- "cityId": "ck108q0se017c0715zfh68162",
- "profession": "Pelajar (SMP)",
- "schoolId": "ck108q0se017c0715zfh68162",
- "otherSchoolName": null,
- "schoolGradeId": "ck108q0se017c0715zfh68162",
- "schoolTypeId": "ck108q0se017c0715zfh68162",
- "schoolProvinceId": "ck108q0se017c0715zfh68162",
- "schoolCityId": "ck108q0se017c0715zfh68162"
}
{- "user": {
- "id": "ck108q0se017c0715zfh68162",
- "email": "john@mail.com",
- "firstName": "John",
- "lastName": "Doe",
- "isEmailVerified": false,
- "totalSkilPoin": 0,
- "skilBadge": [
- {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Web Development Pemula (Gold)",
- "openBadgeId": "d0l5r05nTZWetl98ijoXUQ",
}
], - "totalSkilBadge": 1,
- "totalCourse": 1,
- "totalCompletedCourse": 1,
- "totalPath": 1,
- "totalCompletedPath": 1,
- "gender": "MALE",
- "birthPlace": "Indonesia",
- "birthDate": "2020-11-10T00:00:00.000Z",
- "province": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Aceh"
}, - "city": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Kab. Aceh Selatan"
}, - "profession": "Pelajar (SMP)",
- "phone": 82111111111,
- "address": "Jl. Apel 1",
- "zipCode": "12345",
- "pictureUrl": "string",
- "school": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "SD IT INSAN MADANI MEUKEK",
- "grade": {
- "id": "ck108q0se017c0715zfh68162",
- "grade": "SD"
}, - "type": {
- "id": "ck108q0se017c0715zfh68162",
- "type": "Swasta"
}, - "province": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Aceh"
}, - "city": {
- "id": "ck108q0se017c0715zfh68162",
- "name": "Kab. Aceh Selatan"
}
}, - "otherSchool": { }
}, - "error": null
}