Number Masking Credentials
Credentials entries are used to generate Authorization header values for calls to clients APIs. There is only one such entity per Infobip account.
Number Masking Credentials are used to generate an Authorization header value, by:
- Concatenating URL path of the API, query parameters, request body and the credential key
- Hashing the concatenated string with SHA256
- And prepending it with the apiId
Authorization: apiId:SHA256(url + query parameters + body + key)
| Property name | Type | Required | Explanation |
|---|---|---|---|
| apiId | string | true |
The first part of the generate Authorization header |
| key | string | true |
Used to generate the second part of the Authorization header |
Create Number Masking Credentials
Request
POST/voice/masking/2/credentials HTTP/1.1
Host: api.infobip.com
{
"apiId": "55ddccad2df62a4b615b7e3c472b2ab6",
"key": "5da086b6a8e4424993646b8699c333ca"
}
Response
200 OK
JSON
{
"apiId": "55ddccad2df62a4b615b7e3c472b2ab6",
"key": "5da086b6a8e4424993646b8699c333ca"
}
400 Bad Request
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "[apiId : may not be empty]"
}
}
}
409 Conflict
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "[credentials already exist]"
}
}
}
Get Number Masking Api Credentials
Request
GET /voice/masking/2/credentials HTTP/1.1
Host: api.infobip.com
Response
200 OK
{
"apiId": "55ddccad2df62a4b615b7e3c472b2ab6",
"key": "5da086b6a8e4424993646b8699c333ca"
}
404 Not Found
Update Number Masking Credentials
Request
PUT /voice/masking/2/credentials HTTP/1.1
Host: api.infobip.com
{
"apiId": "55ddccad2df62a4b615b7e3c472b2ab6",
"key": "5da086b6a8e4424993646b8699c333ca"
}
Response
200 OK
{
"apiId": "55ddccad2df62a4b615b7e3c472b2ab6",
"key": "5da086b6a8e4424993646b8699c333ca"
}
400 Bad Request
{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "[apiId : may not be empty]"
}
}
}
404 Not Found
Delete Number Masking Credentials
Request
DELETE /voice/masking/2/credentials HTTP/1.1
Host: api.infobip.com
Response
204 No Content
Credentials were successfully deleted
404 Not Found