Evaluating bids

Simples Api de retorno de token após enviado usuário e senha

Published on the August 22, 2024 in IT & Programming

About this project

Open

Preciso de um endpoint que me retorne o access_token de autenticação de um site exerno após eu informar o usuário e senha.

Ele funciona basicamente assim:
O endpoint do site externo /api/auth/login recebe o payload abaixo
{
  "login": "usuariotop@gmail.com",
  "email": "usuariotop@gmail.com",
  "password": "Senha123",
  "captcha_token": "t1:0.fTTPKFLyFHid3lk9AmkvZTglhwUcJ1m0jUubGV2GdxuY1dtMP58c7Ecr"
}
e após verificado com sucesso, retorna a resposta abaixo:
{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FwaWJldG1pbGxpb25pby5iczJiZXQuY29tL3YyL2F1dGgvbG9naW4iLCJpYXQiOjE3MjQzMzU3MzksImV4cCI6MTcyNDk0MDUzOSwibmJmIjoxNzI0MzM1NzM5LCJqdGkiOiJOcDJ4d0RDeVB5bWlKWWRHIiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3IiwiaGEiOiI0IiwiaGIiOiIxMTI0YThkMWMyMzQ0Y2JmM2Q4Yjg1ZTJiY2YyYWE3ZSIsImhjIjoiM2JmNzIxOTYwOGRiYmM4YWFlNGNhN2I2YWYxYmMwZmYifQ.0fqgeyqw8pf1gef6sd7ruy7wmawwasa0yxvrn09yzzo",
    "token_type": "bearer",
    "expires_in": 604800,
    "user": {
        "id": 45,
        "name": "joao silva",
        "email": "usuariotop@gmail.com",
        "username": "8a9s0f8nnf841213s",
        "email_verified_at": null,
        "token": "siteio_-m190asanj83qdncas3sx",
        "ftd_value": 0,
        "ftd_date": null,
        "created_at": "2024-05-16T23:12:00.000000Z",
        "updated_at": "2024-05-16T23:12:00.000000z",
        "is_active": 1,
        "phone": "1199999999",
        "commission": null,
        "manager_id": null,
        "admin_id": null,
        "commission_grid_id": null,
        "affiliation_code": "a938apid123",
        "recommended_by": null,
        "menu_list": null,
        "bonus_enabled": 0,
        "first_name": "joao",
        "last_name": "silva",
        "mother_name": "",
        "gender": 2,
        "birth_date": "1990-01-01",
        "cancelled_account": 0,
        "is_test": 0,
        "ddi": "+55",
        "country": "bra",
        "currency": "brl",
        "language": "pt-br",
        "timezone": "america\/sao_paulo",
        "address": null,
        "city": null,
        "state": null,
        "zipcode": null,
        "app_source": null,
        "roles": [
            {
                "id": 5,
                "name": "player",
                "guard_name": "api",
                "created_at": "2024-04-15t23:30:15.000000Z",
                "updated_at": "2024-04-15T23:30:15.000000Z",
                "pivot": {
                    "model_id": 45,
                    "role_id": 5,
                    "model_type": "App\\Models\\User"
                }
            }
        ],
        "document": {
            "id": 43,
            "type": "cpf",
            "number": "09463000976",
            "user_id": 45,
            "created_at": "2024-05-16T23:12:00.000000Z",
            "updated_at": "2024-05-16T23:12:00.000000Z"
        }
    }
}

Preciso apenas do access_token.

Preciso ter acesso ao código fonte para poder modificar urls e enpoints quando precisar.

Project overview

O site em questão solicita captcha ao logar e através de métodos tradicionais de curl em php não conseguimos obter o access_token, pois dá erro de captcha. Então buscamos alguém que possa nos ajudar nesse evento pontual.

Category IT & Programming
Subcategory Web development
What is the scope of the project? Small change or bug
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed
API Integrations Other (Other APIs)
Roles needed Developer

Delivery term: August 26, 2024

Skills needed

Other projects posted by B. A.