Auth100

FREEMIUM
By Tato | Updated 21일 전 | Database
Popularity

0.1 / 10

Latency

127,254ms

Service Level

0%

Health Check

N/A

README

GET STARTED

First of all … let’s start by creating a new OWNER

> You can check the endpoint “Create new Owner” in this document.

Remember or save the keys generated to your “Owner” account so that later you can use them to create, modify and administer your users.

After creating your “Owner” account, you can start using the api easily and simply.

OWNER FLOW

Create new Owner

Method: POST
URL: /owner
Headers: “country-code”: “AR”

Body:
{ "email": "owner@owner.com", "password": "Password123", "owner": "Your name here" }

Response:
{ "result": { "uuid": "426e8da8-ba8d-4622-9e53-86587d6bca9c", "verificationCode": "9946", "secret": "oItQ7vJSViXDjcmPywrX+USAbVE4R44Zsoz/0wZVXhk=" } }

Where:
uuid => Owner uuid
verificationCode => Owner verification code for activate owner
secret => Owner secret key (Not in use yet)

Verify Owner

Method: PUT
URL: /owner/426e8da8-ba8d-4622-9e53-86587d6bca9c/verify
Headers: “country-code”: “AR”

Body:
{ "verificationCode": "9946" }

Response:
{ "result": { "id": 8 } }

Where:
id => Owner id

Resend Owner verification code

Method: PUT
URL: /owner/426e8da8-ba8d-4622-9e53-86587d6bca9c/resend
Headers: “country-code”: “AR”

Body:
none

Response:
{ "verificationCode": "5844" }

Request change password

Method: POST
URL: /owner/request-change-password
Headers: “country-code”: “AR”

Body:
{ "email": "owner@owner.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d" }

Response:
{ "result": { "successful": true, "verificationCodePassword": "1878" } }

Change password

Method: PUT
URL: /owner/change-password
Headers: “country-code”: “AR”

Body:
{ "email": "owner@owner.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "verificationCodePassword": "1878", "password": "newPassword123" }

Response:
{ "result": { "successful": true } }

USER FLOW

Create new User

Method: POST
URL: /users
Headers: “country-code”: “AR”

Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "password": "Password123", "rol": 1 }

Response:
{ "result": { "uuid": "a367d66b-c695-43fc-bccd-f7964059d45c", "verificationCode": "3623" } }

Where Body Request:
ownerUuid => Your Owner uuid
rol => Role to assign to the user

Where Body Response:
uuid => User Uuid
verificationCode => User Verification Code

Verify User

Method: PUT
URL: /users/a367d66b-c695-43fc-bccd-f7964059d45c/verify
Headers: “country-code”: “AR”

Body:
{ "verificationCode": "3623" }

Response:
{ "result": { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Miwicm9sIjoxLCJpYXQiOjE2MzQwMDQ0NzIsImV4cCI6MTYzNDAwNTA3Mn0.1FY5Z9LAo7unJpPRp3MoIt8A5IsxHKJCHPRbqAQh1_4", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Miwicm9sIjoxLCJpYXQiOjE2MzQwMDQ0NzJ9.QNO69a4pu0n3j57GfZS7a7eyQxd4zMIArIq4Cx2XV8M", "id": 2 } }

Where Body Response:
id => User id

Resend Verification Code User

Method: PUT
URL: /users/a367d66b-c695-43fc-bccd-f7964059d45c/resend
Headers: “country-code”: “AR”

Body:
none

Response:
{ "result": { "verificationCode": "8018" } }

Request change password

Method: POST
URL: /users/request-change-password
Headers: “country-code”: “AR”

Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d" }

Response:
{ "result": { "successful": true, "verificationCodePassword": "2635" } }

Request change password verify

Method: POST
URL: /users/request-change-password-verify
Headers: “country-code”: “AR”

Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "verificationCode": "2635" }

Response:
{ "result": { "successful": true } }

Change Password

Method: PUT
URL: /users/change-password
Headers: “country-code”: “AR”

Body:
{ "email": "user@user.com", "ownerUuid": "bdd339af-b926-4215-94d6-29375773695d", "verificationCodePassword": "2635", "password": "newPassword123" }

Response:
{ "result": { "successful": true } }

Get list users

Method: GET
URL: /users?owner=bdd339af-b926-4215-94d6-29375773695d
Headers: “country-code”: “AR”

Body:
none

Response:
{ "result": [ { "id": 1, "email": "test@test.com", "rol": { "id": 1, "description": "USER" } }, { "id": 2, "email": "user@user.com", "rol": { "id": 1, "description": "USER" } } ] }

Get user by id

Method: GET
URL: */users/id/2/?owner=bdd339af-b926-4215-94d6-29375773695d
Headers: “country-code”: “AR”

Body:
none

Response:
{ "result": { "createdAt": "2021-10-12T04:58:34.000Z", "updateAt": "2021-10-12T05:10:35.000Z", "id": 2, "email": "user@user.com", "emailToVerificate": "user@user.com", "verificationAt": "2021-10-12T02:07:52.000Z", "password": "$2b$10$zCZlLapxZlmf3DBmsYHne.OL8VE3ztJbnf2MJnSOGfuKORWyEGlUi", "verificationCode": "8018", "verificationCodePassword": null, "active": true, "uuid": "a367d66b-c695-43fc-bccd-f7964059d45c", "refreshToken": null, "rol": { "id": 1, "description": "USER", "enable": true }, "country": { "id": 11, "name": "Argentina", "acronym": "AR", "iso": "54" } } }

Get user by uuid

Method: GET
URL: */users/uuid/a367d66b-c695-43fc-bccd-f7964059d45c
Headers: “country-code”: “AR”

Body:
none

Response:
{ "result": { "createdAt": "2021-10-12T04:58:34.000Z", "updateAt": "2021-10-12T05:10:35.000Z", "id": 2, "email": "user@user.com", "emailToVerificate": "user@user.com", "verificationAt": "2021-10-12T02:07:52.000Z", "password": "$2b$10$zCZlLapxZlmf3DBmsYHne.OL8VE3ztJbnf2MJnSOGfuKORWyEGlUi", "verificationCode": "8018", "verificationCodePassword": null, "active": true, "uuid": "a367d66b-c695-43fc-bccd-f7964059d45c", "refreshToken": null, "rol": { "id": 1, "description": "USER", "enable": true }, "country": { "id": 11, "name": "Argentina", "acronym": "AR", "iso": "54" } } }

Delete user by id

Method: GET
URL: */users/id/2/?owner=bdd339af-b926-4215-94d6-29375773695d
Headers: “country-code”: “AR”

Body:
none

Response:
{ "result": { "id": 2 } }

Delete user by uuid

Method: DELETE
URL: */users/uuid/a367d66b-c695-43fc-bccd-f7964059d45c
Headers: “country-code”: “AR”

Body:
none

Response:
{ "result": { "id": 2 } }

ROLES:

  • 1= USER
  • 2 = SELLER
  • 3 = BUYER
  • 4 = SEMIADMIN
  • 5 = ADMIN

> These roles are simply for organizing, but you can put them to whatever use you like.

Followers: 0
API Creator:
Rapid account: Tato
Tato
nachogonza123-maNFUM16e_H
Log In to Rate API
Rating: 5 - Votes: 1