Skip to content

Quick Start Guide

How to authenticate to the Ellos API

The platform APIs use the Bearer Token protocol to authenticate and authorize API access. Follow the steps below to authenticate and consume the API.

Request the Bearer Token

To query the APIs, it is necessary to obtain a temporary access token (Bearer). This token has a validity period and whenever it expires, this request step must be repeated.

How to request the Access Token (Bearer)

To request the temporary token, you must perform an HTTP POST request to the endpoint https://api.ellos.org.br/ellos/associate/api/Associate/login.

By providing the email and password, make the API request.

                            
                            curl -X POST "https://api.ellos.org.br/ellos/associate/api/Associate/login" \
                            -H "accept: application/json" \
                            -H "Authorization: Bearer eyJraWQiOiI4aTV5cndFMVlreGc4M0FWXC9MTWFacHk0b0J0TEJ6a01yN21" \
                            
                        

The parameters used in the example above are:

  • [HEADER] Accept: application/json
    Indicates the data type requested, in this case JSON.

  • [HEADER] Authorization: Bearer eyJraWQiOiI4aTV5cndFMVlreGc4M0FWXC9MTWFacHk0b0J0TEJ6a01yN21
    Indicates the received access token.

  • [POST] https://api.ellos.org.br/ellos/associate/api/Associate/login

Example of expected request:

                            
                                {
                                    "email": "yourEmail.com",
                                    "password": "Your Password"
                                }
                            
                        

Example of expected response:

                            
                                {
                                    "success": true,
                                    "data": {
                                        "email": "yourEmail.com",
                                        "name": "YourName",
                                        "token": "eyJraWQiOiI3YkFrTDJsdEhDMVhDcUNIpWRxcHVoTUFsWDBZVWdCXC9QSllNcTdQNkpSbz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhYTI2MDU2MC1hYTRmLTRhY2QtYmQ0ZS1iYTI1YjJjN2YzNjkiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfQ09iVXJKaVhKIiwiY29nbml0bzp1c2VybmFtZSI6Inlnb3IubGltYUBwcHByby5jb20uYnIiLCJhdWQiOiI0YXF1YW0xdHFvajFmdHA5aDc5dnVtc2ppYSIsImV2ZW50X2lkIjoiMGI2Y2ExM2EtMDY3NC00ZmRkLWIzZmEtNDVlNzRjZWUxMTUwIiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE3NDgyNjg1OTIsIm5hbWUiOiJZZ29yIFNhbnRvcyBEZSBMaW1hIiwiZXhwIjoxNzQ4MjcyMTkyLCJpYXQiOjE3NDgyNjg1OTIsImVtYWlsIjoieWdvci5saW1hQHBwcHJvLmNvbS5iciJ9.HfiZI2O8Oojix7dK101lBBSwH56dQmPkgeqJopQHkN7NEHvs-0YcSOgvYEXgH2E36eepPBI_WWvPJqcvyYn_iMQLSQscG3uWnw5oP72_toWhL3cX6MMZabVRiJvGJe7XoezmKUOczSEcLxa4Yj8ZIfMkI6PAz2bZUaDgNoSr2gDOiBhxkdbjevt2xrL27YUryD7NBv41Elmi7Ehz_KgdG7L-zPE3_SI8nPc9JLZxxEbvDbPAHM3rgXyvoqACC2TrpQnPKXF83mVL4DoSVDO488ca2ghrp-36TGbbG7G_95k1LfoZzuLozrSX0lxP9T_7C9xVKEoW6M5lICo3MpYf7Q",
                                        "profilePicture": null,
                                        "refreshToken": "eWdvci5saW1hQHBwcHJvLmNvbS5iciwgSnkwMjAxMTk8Mw=="
                                    },
                                    "errors": null
                                }