Giter Site home page Giter Site logo

bling-api-v3's Introduction

Bling-Api-V3

Esse script foi desenvolvido para facilitar e obter o Access Token da API V3 do Bling, assim podendo aliviar agilidade do desenvolvimento do seu software.

1° É preciso criar um arquivo texto com as credenciais Client_id e Client_secret e depois informar o caminho para o paramentHeader

dados.txt
client_id:bd7865c12ba70b496xxxxxxxbdfb72ca1,
client_secret:28703e2b44bd5408xxxxxxxx43131d5320f58caa606b4a4d459c
BlingV3().parmentHeader("dados.txt")

2° Informar ao paramentro paramentCode o code da url em formato String

BlingV3().paramentCode("82972ca43131d5320f58xxxxxx")

3° Devesse criar um variavel que ira obter objeto com Access Token

listObject = BlingV3().tokenApi()
{'access_token': '8ee52a9xxxxxxxaf28810ed9', 'expires_in': 21600, 'token_type': 'Bearer', 'scope': '9xx08 98xx9 98x0 9x313 9xx14 98xx5 1xxxxx4 57xx04 156xxx2 5xxxx6 6631498 106xxxx10 1xxxx097 199xxxx9 20xxxx821 2206xxx74 3xxx7553 3182xxx56 3xxx57559 31xx565 318xxx570 3182xxx76 3xxxx5 363xxx90 363xx591 3xxx167 3xxxx3556 363953706 79158xxxx 87xxxxx881 164xxxx4 178xxxxxx11 18xxx35257 58xxxx180 623xxx327 13xxx012976 13645xx97 13645xxx998', 'refresh_token': 'cf9783bxxxxxc1df0d914dab2'}

Além disso, sera gerado um arquivo credential e dentro tera um arquivo .txt com todos os dados da requisição.


4° Caso queira solicitar um novo Access token atraves do Refresh Toke devera criar um objeto que recebe os novos parametro.

BlingV3().parmentHeader('dados.txt')
listObj = BlingV3().refreshToken("cf9783b3a3c960xxxxxxxx0d914dab2")

Será atualizado tambem o arquivo .txt contendo os dados da requisição




Exemplo Access Token

BlingV3().paramentHeader('/home/matheus/Documents/Api/dados.txt')
BlingV3().paramentCode('3b3a3c960xxxxxxxx0d914dab2')
listObject = BlingV3().tokenApi()



Exemplo Refresh Token

BlingV3().paramentHeader('/home/matheus/Documents/Api/dados.txt')
listObject = BlingV3().refreshToken('3b3a3c960xxxxxxxx0d914dab2')

bling-api-v3's People

Contributors

matheusbruno avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.