- Forums
- >
- API Platform
- >
- newbie questions about API console and SendSMSv2
- Thread RSS
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Favorite
- Subscribe
newbie questions about API console and SendSMSv2
- Mark as New
- Favorite
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Flag as Inappropriate
06.08.2012 07:43 AM
Hello
I am making my first steps in the API platform and I have a couple questions about the console:
If I want to try the send SMS API, is it mandatory to pass an oAuth access_token ?
Why doesn't the console expose the oAuth API to obtain an access token ?
I tried to manually construct a token request for the client credentials flow and succeded in obtaining tokens with 2-hour validity. However, when I append the access_code parameter with the value returned by the oAuth API to the SendSMSv2 request parameters, I still get a security exception...
How do I get sendSMS to work in the console ?
Thx in advance for your help
Re: newbie questions about API console and SendSMSv2
- Mark as New
- Favorite
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Flag as Inappropriate
06.11.2012 08:05 AM
Hello,
Yes, it is mandatory to pass an OAuth token. On the API console, you can do this by clicking on the dropdown menu next to the query URL entry field. It has a lock as an icon. Choose OAuth there to initiate the OAuth token flow.
Hope that helps,
--brett
Re: newbie questions about API console and SendSMSv2
- Mark as New
- Favorite
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Flag as Inappropriate
06.11.2012 09:25 AM
Hi Brett
Thanks for your answers, however that does not help me much
The option you refer to triggers the oAuth authorisation code grant flow, which is really complicated from a user standpoint + requires to have an AT&T phone at hand which I don't have since I am based in France ... duh
Also the API doc for the SMS API says that the API does not require the authiorisation code grant flow and that developers shoudl obtain access tokens using the client credentials flow
So back to square 1: how do I get to test the send SMS API in teh console with an access token obtained using the client credentials flow ?
Thx in advance
/Guilhem
Re: newbie questions about API console and SendSMSv2
- Mark as New
- Favorite
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Flag as Inappropriate
06.11.2012 11:27 AM
Hi Guilhem,
This is a limitation on the API console at the moment...every API that requires OAuth needs to go through authorization code grant flow. So, in your situation, you won't be able to use the API console, since the API console is tied to a particular application (i.e. not your application); and since you don't have an AT&T phone, you won't be able to use the authorization code grant flow.
You could try to use some other tools. For example, if you are familiar with curl, you could use that to make requests.
Let me know if you need anymore more details.
--brett
Re: newbie questions about API console and SendSMSv2
- Mark as New
- Favorite
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Flag as Inappropriate
06.13.2012 01:09 AM
Hi Brett
Thanks for the explanation, it all makes sense now
I'll go with curl then
/Guilhem
-
-
- of 1
-
-
