---
title: Cliente
slug: VsFJ-cliente
createdAt: 2022-06-21T21:07:04.000Z
---

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://sandbox.partner.graphql.gyramais.com.br/",
  "name": "Autenticação de clientes",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "gyramais-api-key",
        "kind": "required",
        "type": "string",
        "description": "API-Key gerada através do portal do parceiro",
        "children": []
      },
      {
        "name": "gyramais-api-secret",
        "kind": "required",
        "type": "string",
        "description": "API-Secret gerada através do portal do parceiro",
        "children": []
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "customerId",
        "type": "string",
        "description": "É a chave recebida na criação ou consulta a empresa"
      },
      {
        "name": "productType",
        "kind": "optional",
        "type": "string",
        "description": "Direciona o cliente para a jornada do produto escolhido:\n\"PREPAYMENT\" = antecipação de recebíveis de cartão\n\"LOAN\" = capital de giro",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "WH7LivTqtjO0siHa85G1u",
        "code": "{\n \"data\": {\n    \"customerAuthenticate\": \"http://localhost:7071/autenticacao?token=00000-token-example\"\n  }\n}",
        "language": "200",
        "customLabel": ""
      },
      {
        "id": "WkC7nVUjejQIEhevgRDC_",
        "code": "{\n  \"message\": \"error.\"\n}",
        "language": "404",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "WkC7nVUjejQIEhevgRDC_"
  },
  "examples": {
    "languages": [
      {
        "id": "z1sehVSGh1-bho59jBBf-",
        "code": "Headers\n{\n  \"gyramais-api-key\": \"key-example-ak\",\n  \"gyramais-api-secret\": \"secret-example-as\"\n}\nQuery\nmutation customerAuthenticate{\n  customerAuthenticate(customerId:\"\", productType:\"\")\n}",
        "language": "graphql",
        "customLabel": ""
      },
      {
        "id": "JgLYltML-84FboCSZQSiN",
        "language": "curl",
        "code": "curl --location --request POST 'https://sandbox.partner.graphql.gyramais.com.br' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"customerId\":\"string\",\"productType\":\"string\"}'",
        "customLabel": ""
      },
      {
        "id": "qjjOkNTT_eIist0Ruc1NL",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://sandbox.partner.graphql.gyramais.com.br',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"customerId\": \"string\",\n      \"productType\": \"string\"\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "nRb9Ab7iovWBrTHGYMSwI",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"customerId\": \"string\",\n   \"productType\": \"string\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://sandbox.partner.graphql.gyramais.com.br\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "ejKYnUXvJirdZjOaAF1mW",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://sandbox.partner.graphql.gyramais.com.br\"\n\npayload = json.dumps({\n   \"customerId\": \"string\",\n   \"productType\": \"string\"\n})\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "7YHkVemQKj6VB0ebriz_J",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.partner.graphql.gyramais.com.br\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"customerId\": \"string\",\n   \"productType\": \"string\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "JgLYltML-84FboCSZQSiN"
  },
  "description": "Para que um cliente tenha acesso ao Portal GYRA+ para finalizar o cadastro, acompanhar solicitações de empréstimos e realizar pagamentos, você deverá fazer a autenticação do seu cliente através do método abaixo. \nA api de autenticação do cliente retornará um link de acesso para o cliente. O link é automaticamente invalidado após o primeiro acesso.",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  }
}
```
:::



