Giter Site home page Giter Site logo

DEMO: Возвращаются invalid или expired access_token при обмене Code Grant на Access Token about api-spec HOT 5 CLOSED

oceanvibes avatar oceanvibes commented on May 23, 2024
DEMO: Возвращаются invalid или expired access_token при обмене Code Grant на Access Token

from api-spec.

Comments (5)

oceanvibes avatar oceanvibes commented on May 23, 2024

Когда ждать ответ?

from api-spec.

danakonovalenko avatar danakonovalenko commented on May 23, 2024

З токеном все гаразд, він діє до Tuesday, August 28, 2018 10:38:55 AM. Така помилка також може бути коли не передавався api-key. Можете перевірити чи в api call передавався api-key.

from api-spec.

oceanvibes avatar oceanvibes commented on May 23, 2024

Дякую за відповідь.
api-key дійсно в заголовку не передавали. Передали - все працює.

from api-spec.

oceanvibes avatar oceanvibes commented on May 23, 2024

Тільки тепер не створюються devisions:

Request Headers:

Authorization: Bearer amg2OXlTbVNoZEo2SEk3dU1VVFBpUT09
Content-Type: application/json
api-key: 9cea483e5eb8af18a598

Request Body:

{
  "name": "Бориспільське відділення Клініки Ноунейм",
  "addresses": [
    {
      "type": "RESIDENCE",
      "country": "UA",
      "area": "Житомирська",
      "region": "Бердичівський",
      "settlement": "Київ",
      "settlement_type": "CITY",
      "settlement_id": "43432432",
      "street_type": "STREET",
      "street": "вул. Ніжинська",
      "building": "15",
      "apartment": "23",
      "zip": "02090"
    }
  ],
  "phones": [
    {
      "type": "MOBILE",
      "number": "+380503410870"
    }
  ],
  "email": "[email protected]",
  "working_hours": {
    "mon": [
      [
        "08.00",
        "12.00"
      ],
      [
        "14.00",
        "18.00"
      ]
    ],
    "tue": [
      [
        "08.00",
        "12.00"
      ]
    ],
    "wed": [
      [
        "08.00",
        "12.00"
      ]
    ],
    "thu": [
      [
        "08.00",
        "12.00"
      ]
    ],
    "fri": [
      [
        "08.00",
        "12.00"
      ]
    ],
    "sat": [
      [
        "08.00",
        "12.00"
      ]
    ],
    "sun": [
      [
        "08.00",
        "12.00"
      ]
    ]
  },
  "type": "CLINIC",
  "external_id": "3213213",
  "location": {
    "latitude": 30.1233,
    "longitude": 50.32423
  }
}

Response:
{"meta":{"url":"http://api-svc.il/api/divisions","type":"object","request_id":"783dfcf0-c0a1-46f2-80c8-5b90efbb9b1e#54013","code":500},"error":{"errors":{"detail":"Internal server error"}}}

from api-spec.

danakonovalenko avatar danakonovalenko commented on May 23, 2024

проблема в "settlement_id": "43432432" - значення не є валідним, settlement_id - це uuid, який має бути отриманий викликом /api/uaddresses/settlements?. Також валідується ієрархія - область та район.
Для прикладу:

 "addresses": [
    {
        "type": "RESIDENCE",
        "country": "UA",
        "area": "ВОЛИНСЬКА",
        "settlement": "ЛУЦЬК",
        "settlement_type": "CITY",
        "settlement_id": "2029f5e9-0682-4ecf-b4c3-605a9ef800ca",
        "street_type": "STREET",
        "street": "Олицька",
        "building": "2",
        "apartment": "23",
        "zip": "43000"
      }
  ]

from api-spec.

Related Issues (20)

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.