Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom url callback scheme

ANSWERED

Hello,

 

Would it be possible to allow the use of a custom scheme?

 

(i.e.) instead of http://, https://, file:// etc.  I'd like to use overwolf-extension://  Currenlty, overwolf-extension:// does not validate when I attempt to use it as a redirect URL in my application's settings.

 

For reference: http://developers.overwolf.com/url-based-api/ 

 

For context:  I have a treadmill desk at home that I love to use and I regularly use my fitbit while walking.  What I want is for an application that will show current steps (updated every 30-60 seconds), maybe a progress bar to daily goal, etc. while playing a pc game, watching netflix, etc via the Overwolf overlay.

 

Thanks!

 

Best Answer
0 Votes
27 REPLIES 27

Hi @Navindas

 

What is your complete redirect URL?

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

My complete redirect url is mentioned below:
https://www.nourishgenie.com

I have changed it to https but on the allow page when you people ask user to allow to access fitbit settings such as sleep, activity tracking, heart rate etc.  On that page "allow" or "deny" button is not working even If I select "Allow All" option still "allow" or "deny" button is not functioning properly it never go to next page or back page and I am doing this thing on iOS for mobile.
--
Regard,
Navindas Ghadge - Software Engineer

Best Answer
0 Votes

Custom URLs should work as the redirect URL, so you should be able to use myiOSapp://.  However, this URL needs to be an absolute URL.  This means, you need to include a specific entry point into your application such as myiOSapp://callback.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

I tried with custom url scheme as you mentioned but still it didnt work for me. I tried it on OAuth 2.0 tutorial page on desktop where I get already generated authorize url and clicking on that url it opens the new tab of browser and shows blank response in the url bar. I have set custom redirect url like myiOS://www.nourishgenie.com.

Please reply as soon as possible.

Best Answer
0 Votes

No still it not working for custom url scheme. I tried to do it on oauth 2.0 tutorial page with custom url scheme e.g myiOS://callback or myiOS:// still it does not give me access token which I wanted for further web api services,  it gives me a blank response. Please try to do it on OAuth 2.0 tutorial page.

Best Answer
0 Votes

Hi @Navindas,

 

The URLs provided, myiOS://www.nourishgenie.com and myiOS://callback, should be real access points in your application that should accept the authorization code provided in the browser URL.

 

For example, once you enable the scopes and press the allow button, the user should be redirected to the callback URL.  The URL will also contain the authorization code.  Here's what it would look like

 

https://oauth.net/callback?code=fa640ab1d3c3566834eec7f65ede398c6ae9b271&state=no_data#_=_

 

Your application needs to parse this URL to obtain the authorization code, the request the access token using the authorization code.   Did you see this when you tried the OAuth 2.0 tutorial page?

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

No I didnt see any authorization code when I was trying to authorize in OAuth 2.0 tutorial page, the url bar was showing only this response "about:blank", and I am using "Implicit grant flow" to have access token for further web api services. I am getting access token but with "https" url scheme but problem is that iOS doesn't recognize "https" url scheme it only recognize "custom" url scheme and I want access token with custom url scheme. So because of this reason I am unable to catch redirect URL in safari view controller through which it helps to open specific app through that redirect URL.

Best Answer
0 Votes

For Implicit Grant Flow, your redirect URL will contain the access_token, the user_id, the scopes the user enabled, the token type and the lifetime length of the token.  Here's an example.

 

https://oauth.net/callback#access_token=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyMkNaV0MiLCJzdWIiOiIySDJQSEY...

 

If you're receiving "about:blank", then I think you have something configured incorrectly.  Would you please private message me your client ID?   

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes