0

Not getting authorization_code in redirect uri after authorize user using https://signin.mindbodyonline.com/connect/authorize

Request: https://signin.mindbodyonline.com/connect/authorize?nonce=xxx&response_type=code%20id_token&client_id=#{xxx}&redirect_uri=#{xxx}&scope=email profile openid Mindbody.Api.Public.v6&subscriberId=xxx&staff=true

Response: Got nothing in redirect uri

  • You are not giving us much to work with. Are you submitting all the [required parameters](https://developers.mindbodyonline.com/PublicDocumentation/V6#oauth) with your request? What is the response that you get from the server? Does it contain any useful info on why it's not giving you an authorization code? – 3limin4t0r Jul 01 '22 at 13:37
  • @3limin4t0r Yes, submitting all required parameters, It redirecting to mindbody login page, once logged in it redirect to given redirect uri with no params – Manisha Odedara Jul 01 '22 at 13:52
  • Your current request contains spaces, which is not allowed in a URL. Make sure to percent encode your parameters (with [`CGI.escape`](https://docs.ruby-lang.org/en/3.1/CGI/Util.html#method-i-escape) or another tool). For example: `uri = URI('https://signin.mindbodyonline.com')`, `uri.path = '/connect/authorize'`, `query_params = { nonce: 'xxx', ... }`, and finally `uri.query = query_params.map { |key, value| "#{CGI.escape key.to_s}=#{CGI.escape value.to_s}" }.join('&')` – 3limin4t0r Jul 01 '22 at 14:49

0 Answers0