Log in to create an API key
/auth/loginThis endpoint is to login so you can create an API key. You need to be signed up to MyGigsters first to be able to log in this way.
Request Body
| Parameter | Type | Description |
|---|---|---|
| email * | string | Your email you signed up with MyGigsters |
Responses
| Response Code | Description | Schema | ||||||
|---|---|---|---|---|---|---|---|---|
| 200 | A User object |
| ||||||
| 400 | Email not provided |
| ||||||
| 404 | Email not found on the system |
| ||||||
| 500 | Unknown system error |
|
Sample Request - cURL
curl 'https://super.mygigsters.com.au/auth/login' -X POST \
-H "Content-Type: application/json" --data '{"email":"email@email.com"}' Sample Response - 200
{
"message": "OTP sent to your email"
}Verify OTP received after login
/auth/verify-otpThis route returns the JWT for use with API Keys routes (/api-keys/) - note that the OTP is always 123456 for non-production environments
Request Body
| Parameter | Type | Description |
|---|---|---|
| otp * | string | One Time Pin to be sent in string format |
| email * | string | The email address which you requested the OTP for |
Responses
| Response Code | Description | Schema | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | Response with the JWT to use for the rest of the API Keys routes |
| |||||||||||||||
| 400 | Missing info in request body |
| |||||||||||||||
| 404 | Cannot find user or invalid OTP |
|
Sample Request - cURL
curl 'https://super.mygigsters.com.au/auth/verify-otp' -X POST \
-H "Content-Type: application/json" --data '{"otp":"123456","email":"email@email.com"}' Sample Response - 200
{
"message": "OTP verified successfully",
"clientId": 1,
"email": "idea@woodevelopment.com",
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImV4cCI6MTc2NjQ0MDg3MiwiaWF0IjoxNzY2NDM3MjcyfQ.N5z-MpfLZqwUrD1Cc0Kj2ciZ9i66I5SIDH0C8daFpkcX_VNcZ_I8ZgW_GLTAnwWjdY_J1e7T7FcwPxxK3MwN9_G5vUIuSRlqzVw87NHhZLS6yIL41wSQ2oJjT0esFO8V7FjakiPuU4qc5duXYWyfeqX8faYzxsD4j0o1L7GqoEHqoaVp-RkOXdPSTmveZI7HqdzqXPgRcLprY3E8Bd59JX5oM8ynf8SKy5GOWSh4VsIhOTZsVO9CPhzBPglTUona1ZpWU9JtwRnwI3LxycuosUvwmJJ8w-bGPhUazRcKmRevE1e29nvqNWPa0RH3f4uneSnS4GYJh3APCvblpwWeHBvtvpAXT84RkWv0dKr5QAZh3wFVGvOcLpIwPP0MXwDNYeZTkR_l_tIRUzSeU56H2hC5kj_X5emR-p76mwnY9dIfYZax3aSxMPeHgyTchR3DQUok-DIZvGLoGE731E1Sqc2eC1itjNjaBqsr_DcwPapXljtI01pCrIZ9TXkH4XgyrCtSrFps9uviv28_GMzIgJcJ6J7PTLpdrOGtY3LWe7bKGksTwe2LkQb-Oj2HyUr7GMMOFhw7wMUz_mrUjJ2pJjFi1XrNEwzApx9UJw1dDC7GiQTxJPH9SvL_re6zH0qK99OtKAU9gCczdMkQ29tBGT0HJrpWDyb62E8j9y5C-EU"
}Adds a new API Key
/auth/createThis endpoint creates an API key. The API Key is to be used in Basic Authentication format eg. curl -u "apiUsername:apiPassword". To access this endpoint you need to obtain a JWT via Get OTP and Verify OTP sections.
Request Body
| Parameter | Type | Description |
|---|---|---|
| name * | string | The friendly name for your key - for your reference only |
Responses
| Response Code | Description | Schema | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | An API Key object |
| |||||||||
| 400 | Invalid API Key details |
|
Sample Request - cURL
curl 'https://super.mygigsters.com.au/auth/create' -X POST \
-H "Authorization: Bearer JWT_FROM_VERIFY_OTP_STEP" \
-H "Content-Type: application/json" --data '{"name":"My Key"}' Sample Response - 200
{
"apiUsername": "39534898-f44e-461e-99fb-c27f3bdd515b",
"apiPassword": "(Qlpej#UXs5NLCS$Rk&+"
}List your API Keys
/auth/listThis endpoint lists API keys. The API Key is to be used in Basic Authentication format eg. curl -u "apiUsername:apiPassword". To access this endpoint you need to obtain a JWT via Get OTP and Verify OTP sections.
Responses
| Response Code | Description | Schema | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | The API Key objects |
|
Sample Request - cURL
curl 'https://super.mygigsters.com.au/auth/list' \
-H "Authorization: Bearer JWT_FROM_VERIFY_OTP_STEP" Sample Response - 200
[
{
"id": "1231412313213",
"name": "My Key",
"apiUsername": "29954bf9-c379-4107-8ed6-7af7eaf30981"
}
]Deletes an API Key
/auth/delete-keyThis endpoint deletes an API key. To access this endpoint you need to obtain a JWT via Get OTP and Verify OTP sections.
Request Body
| Parameter | Type | Description |
|---|---|---|
| id * | string | The ID of your key (not the friendly name) |
Responses
| Response Code | Description | Schema | ||||||
|---|---|---|---|---|---|---|---|---|
| 200 | API Key deleted |
| ||||||
| 204 | No Content | |||||||
| 400 | API Key not provided |
| ||||||
| 404 | API Key not found |
|
Sample Request - cURL
curl 'https://super.mygigsters.com.au/auth/delete-key' -X DELETE \
-H "Authorization: Bearer JWT_FROM_VERIFY_OTP_STEP" \
-H "Content-Type: application/json" --data '{"id":"1231412313213"}' Sample Response - 200
{
"message": "API Key deleted"
}Sample Response - 204
{}