-
Notifications
You must be signed in to change notification settings - Fork 52
Add setup:number #9
Comments
It's the application API might not be in the public docs yet, @leggetter On Friday, 6 May 2016, Cristiano Betta notifications@github.com wrote:
|
@leggetter would love some clarification on this. The docs (https://docs.nexmo.com/tools/application-api) only show the basic CRUD as far as I can see. |
See the section with the para:
https://docs.nexmo.com/tools/application-api#apps_quickstart Is that what you're after? |
@leggetter Not really. Isn't that the app:create function in the CLI docs? |
#!/bin/bash
base_url='https://rest.nexmo.com'
version=''
action='/number/update'
application_id='APPLICATION_ID'
key='API_KEY'
secret='API_SECRET'
country='XX'
msisdn='441632960960'
curl -X POST $base_url$version$action \
-d api_key=$key \
-d api_secret=$secret \
-d country=$country \
-d msisdn=$msisdn \
-d voiceCallbackType='app' \
-d voiceCallbackValue=$application_id As per the text, this is used to associate a number with an app. Isn't that what we're trying to do here? |
@leggetter I think I'm starting to get it. All of the https://docs.nexmo.com/tools/developer-api/number-update So let's rewrite this:
As:
As I'm not quite familiar yet with Nexmo, can someone explain to me what the relevant params are for the |
Do we assign a number to an app or an app to a number? To me it feels like you have a number and you then assign it to an application.
But... A number can only be associated with one app. In fact, we have an idea of number pools where you can create number pools and assign a pool to a number. But there is still some work going on in this space. |
@leggetter honestly no idea. You're the expert :). I'd say a number can be assigned to a few things. This is what the API suggests. So specifying what the number belongs to on the number level might make more sense (and is what the API does, I think). Honestly it's all up to you and what you want. I'd be happy to do either but need some clarity. |
I'm certainly no expert. Based on a conversation from just over a week ago the docs stating Apps can then have number pools (groups of numbers) associated with them. Or you could say that an app has number pools associated with it. I don't believe we expose number pools right now. So associating single numbers is the best we can do, and I think that's fine for now. So both
may be valid. My vote would be for 1. @sammachin - what do you think? |
@sammachin thoughts on this? |
I've been thinking:
That seems the most elegant way to me for now. Does that work? |
Down the line we can make this backwards compatible like this:
Where type is by default |
@leggetter @sammachin I got the |
Ok @sammachin confirmed this is probably not possible yet. Have release this for now as a simple |
@sammachin could you clarify what API call you see this mapping too? I'm having difficulty determining this.
From the doc:
The text was updated successfully, but these errors were encountered: