GYRA+ DOCS
...
Autenticação
Cliente
1 min
{ "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" } }

