Essentials
API essentials
API authorization

API authorization

All authenticated API endpoints also require authorization. This is done by verifying whether the provided credentials, such as an API key or OAuth token, have at least one of the required API scopes. You can assign scopes to the API key as needed.

API scopes

A scope has become a standard term in the API environment. It originated in OAuth2 (opens in a new tab) specification, and the same idea is applied to all authentication types. It is an additional layer of control and security over the REST API that limits what the end-point users, API key, or OAuth clients are allowed to call.

Scopes provide access to a specific set of API endpoints, typically designed to serve specific use cases. Through OAuth2, they define the specific actions that applications are permitted to do on behalf of a user.

By granting a specific API scope to a user or an API key, you limit their access to a subset of API endpoints covered by the scope. In this way, you can prevent the user from accessing data or API functionalities outside of their role. You can limit the potential negative impact of leaked or stolen API keys or user credentials. You can grant several scopes to the same user or API key, covering multiple different API endpoints needed for a complex use case.

API scope types

Various scope types exist depending on the area or context. The main scopes include:

  1. General:

    • message:send
    • inbound-message:read
    • web:sdk
      • Provides access to People and People events API endpoints accessed from client-side SDK
    • mobile-app-messaging:sdk
      • Provides access to the Mobile App Messaging Mobile Push API endpoints accessed from the client-side SDK
  2. product/channel:manage

    • Includes all endpoints related to a specific product or channel; e.g., if it is a Conversations product, it includes all endpoints related to Conversations; if it is an SMS channel, it includes all endpoints related to SMS

Additionally, there are other scope types that vary depending on the channel, product, and different use cases. You can review all available scopes on the Create API key (opens in a new tab) page.

API scope configuration

To configure API scope(s), you will need to allow the API key to access each API endpoint you want to use. To do that, first check the documentation of the API endpoint. It will list the required scopes. Granting any of them will enable the API key to access the endpoint.

You can grant new scopes to an existing API key by editing it or create a new one with scopes from the beginning.

You can manage API keys either through dedicated API (opens in a new tab), or through the web interface.

If you want to configure the API scope(s) through the web interface, navigate to Developer Tools → API Keys → Create API key (opens in a new tab).

From there, enter the following information for the API key:

  • Name
  • Creation date
  • Expiration date
  • Allowed IP addresses (optional)

In the next section, API scopes, choose which scopes you want to include:

  • General
  • Channels
  • Connectivity
  • Platform
  • Customer Engagement
  • Web SDK

Upon selecting a specific scope option, a drop-down menu will appear containing all available scopes. From there, you are required to choose which scopes you want to include in the API key.

Available API scopes

The table below outlines the scopes currently used by the API platform.

ScopeDescription
2fa:manageEnables access to all two-factor authentication API end-points
2fa:pin:manageAllows configuration and management of one-time PIN settings for two-factor authentication
2fa:pin:sendEnables sending of one-time PINs as part of two-factor authentication
apple-mfb:logs:readAllows reading of logs related to Apple Messages for Business
apple-mfb:manageEnables access to all Apple Messages for Business API end-points
apple-mfb:message:sendEnables sending of Apple Messages for Business
calllink:configuration:manageEnables management of configuration for call links
calllink:link:manageEnables management of links related to call links
calllink:manageEnables access to all Call link API end-points
callrouting:manageEnables access to all Call routing API end-points
calls:bulk:manageEnables management of bulk calls
calls:configuration:manageEnables management of all calls API settings
calls:logs:readEnables access to logs related to calls API
calls:manageEnables access to all Calls API end-points
calls:media:manageEnables management of media related to calls API
calls:readEnables access to calls API logs
calls:recording:deleteEnables deletion of Calls recordings
calls:recording:readEnables reading of Calls recordings
calls:traffic:receiveEnables management of incoming calls
calls:traffic:recordEnables recording of calls
calls:traffic:sendEnables sending of calls and actions in calls
clicktocall:manageEnables access to all Click-to-call API end-points
email:logs:readAllows reading of logs related to email messages
email:manageEnables access to all Email API end-points
email:message:sendEnables sending email messages
google-bm:logs:readAllows reading of logs related to Google Business Messages
google-bm:manageEnables access to all Google Business Messages API end-points
google-bm:message:sendEnables sending of Google Business Messages
instagram:logs:readAllows reading of logs related to Instagram messages
instagram:manageEnables access to all Instagram messages API end-points
instagram:message:sendEnables sending of Instagram messages
ivr:configuration:manageEnables management of the IVR configuration
ivr:manageEnables access to all IVR settings and configurations API end-points
ivr:message:sendEnables sending of IVR messages
kakao:logs:readAllows reading of logs related to Kakao messages
kakao:manageEnables access to all Kakao messages API end-points
kakao:message:sendEnables sending of Kakao messages
line:manageEnables access to all LINE messages API end-points
line:message:sendEnables sending of LINE messages
live-chat:manageAllows management of Live Chat functionalities and settings
messenger:manageEnables access to all Messenger API end-points
messenger:message:sendEnables sending of Messenger messages
mms:inbound-message:readAllows access to read inbound MMS messages
mms:logs:readAllows reading of logs related to MMS messages
mms:manageEnables access to all MMS API end-points
mms:message:sendEnables sending of MMS messages
mobile-app-messaging:inbound-message:readAllows reading of inbound Mobile app messages
mobile-app-messaging:manageEnables sending and managing of Mobile app messages
mobile-app-messaging:sendEnables sending of Mobile app messages
numbermasking:manageEnables access to all Number masking API end-points
omni-failover:logs:readAllows reading of logs related to OMNI-channel failover events
omni-failover:manageEnables access to all OMNI-channel failover API end-points
omni-failover:message:sendEnables sending messages via OMNI-channel failover mechanisms
rcs:manageEnables access to all RCS API end-points
rcs:message:sendEnables sending of RCS messages
sms:inbound-message:readGrants access to read inbound SMS messages
sms:logs:readAllows reading of logs related to SMS messages
sms:manageEnables access to all SMS API end-points
sms:message:sendEnables sending of SMS messages
voice:logs:readEnables reading of voice delivery reports
voice:recording:deleteEnables deleting of voice recordings
voice:recording:readEnables reading of voice recordings
web-push:manageAllows management of web push notifications
webrtc:configuration:manageEnables management of WebRTC configuration
webrtc:identity:manageEnables management of WebRTC identity configuration
webrtc:manageEnables access to all WebRTC API end-points
webrtc:media:manageEnables management of media related to WebRTC
whatsapp:inbound-message:readEnables reading of inbound WhatsApp messages
whatsapp:manageEnables access to all WhatsApp API end-points
whatsapp:message:sendEnables sending of WhatsApp messages
zalo:logs:readAllows reading of logs related to Zalo messages
zalo:manageEnables access to all Zalo API end-points
zalo:message:sendEnables sending Zalo messages
viber-bm:logs:readAllows reading of logs related to Viber Business Messages
viber-bm:manageEnables access to all Viber Business Messages API end-points
viber-bm:message:sendEnables sending of Viber Business Messages
viber-bot:logs:readAllows reading of logs related to Viber Bot Messages
viber-bot:manageEnables access to all Viber Bot Messages API end-points
viber-bot:message:sendEnables sending of Viber Bot Messages
voice-message:logs:readEnables access to logs of sent voice messages
voice-message:manageEnables management of all voice messages
voice-message:message:sendEnables sendings of voice messages
voice-reports:readEnables access to voice reports
voice:recording:manageEnables management of voice recordings
web-push:sendEnables sending of web push notifications
rcs:logs:readEnables reading of logs of RCS messages
messenger:logs:readEnables reading of logs of Messenger messages
whatsapp:logs:readAllows reading of logs related to WhatsApp messages
rbm-maap:manageEnables access to all RBM MaaP API end-points
rbm-maap:message:sendAllows sending of RBM MaaP-related messages
mobile-app-messaging:logs:readAllows reading of logs related to Mobile app messages
whatsapp:conversionsEnables access to WhatsApp Conversions
zalo-follower:manageEnables access to all Zalo Follower API end-points
zalo-follower:message:sendEnables sending Zalo Follower messages
zalo-follower:logs:readAllows reading of logs related to Zalo Follower messages
email:templates:manageEnables access to Email Templates api endpoints

User roles and API scopes

Important

We suggest using the API key to access Infobip HTTP API. It provides detailed control over API scopes along with numerous other security features. Learn more about it here.

If you cannot use the API key and must rely on basic authentication, you need to ensure that the user whose password you are using to call API endpoints has been granted the necessary scope to access those endpoints. Unlike API keys, scopes are not directly assigned to users. Instead, you can assign roles to the user, and those roles will implicitly grant certain scopes.

Refer to the list below for scopes that are implicitly granted by specific roles:

Scopes implicitly granted by roles
RoleScopes
Communication Managerinbound-message:read, kakao:logs:read, callrouting:manage, zalo-follower:manage, voice-message:manage, forms:use, people:manage, kakao:manage, number-lookup:logs:read, zalo:manage, messenger:logs:read, voice:recording:delete, numbers:manage, conversations:manage, sending-strategy:manage, whatsapp:logs:read, number-lookup:manage, people:read, calls:manage, voice-message:logs:read, calllink:link:manage, email:manage, number-activation-state:read, 2fa:pin:manage, calls:recording:delete, whatsapp:manage, webrtc:manage, calls:media:manage, 2fa:manage, numbers:recording:manage, voice:recording:read, voice:recording:manage, viber-bm:logs:read, calls:traffic:record, omni-failover:manage, viber-bot:logs:read, ivr:manage, mms:logs:read, apple-mfb:manage, messenger:manage, clicktocall:manage, mobile-app-messaging:manage, email:logs:read, flow:read, ivr:configuration:manage, instagram:logs:read, calls:recording:read, metrics:manage, campaign-tags:manage, calllink:configuration:manage, instagram:manage, message:send, signals:manage, live-chat:manage, apple-mfb:logs:read, rbm-maap:manage, google-bm:logs:read, forms:read, mms:manage, blocklist:manage, sms:manage, omni-failover:logs:read, zalo:logs:read, viber-bot:manage, calllink:manage, forms:manage, flow:manage, rcs:logs:read, line:manage, calls:configuration:manage, web-push:manage, campaign-tags:view, sms:logs:read, content-messages:read, answers:manage, calls:logs:read, voice:logs:read, calls:bulk:manage, catalogs:manage, viber-bm:manage, google-bm:manage, rcs:manage, voice-reports:read, messages-api:manage, numbermasking:manage
People Managerforms:manage, blocklist:manage, people:read, conversations:manage, people:manage, mobile-app-messaging:manage, account-management:manage
Analyze Managerinbound-message:read, metrics:manage, kakao:logs:read, sms:inbound-message:read, forms:use, people:manage, number-lookup:logs:read, apple-mfb:logs:read, google-bm:logs:read, messenger:logs:read, voice:recording:delete, conversations:manage, whatsapp:logs:read, people:read, omni-failover:logs:read, zalo:logs:read, account-management:manage, whatsapp:inbound-message:read, voice-message:logs:read, rcs:logs:read, calls:recording:delete, mms:inbound-message:read, sms:logs:read, calls:media:manage, numbers:recording:manage, voice:recording:read, answers:manage, voice:recording:manage, calls:logs:read, voice:logs:read, viber-bm:logs:read, calls:traffic:record, viber-bot:logs:read, mms:logs:read, email:logs:read, flow:read, voice-reports:read, instagram:logs:read, numbermasking:manage, calls:recording:read, calls:read
Finance Data Managernumbers:manage, conversations:manage, forms:use, account-management:manage
Account Managerzalo-follower:logs:read, inbound-message:read, kakao:logs:read, zalo-follower:manage, kakao:message:send, people:manage, kakao:manage, zalo:manage, messenger:logs:read, whatsapp:logs:read, people:read, sms:message:send, webrtc:media:manage, mms:message:send, audit-logs:read, content-messages:manage, webrtc:manage, numbers:recording:manage, voice:recording:manage, viber-bm:logs:read, omni-failover:manage, viber-bot:logs:read, mms:logs:read, apple-mfb:manage, messenger:manage, email:logs:read, instagram:logs:read, resource-request-hub:read, calls:recording:read, line:message:send, omni-failover:message:send, sms:inbound-message:read, campaign-tags:manage, calllink:configuration:manage, calls:traffic:receive, message:send, live-chat:manage, subscriptions:manage, rbm-maap:manage, forms:read, biometrics:manage, sms:manage, zalo:logs:read, calllink:manage, voice-message:message:send, error-codes:read, zalo:message:send, calls:traffic:send, flow:manage, viber-bm:message:send, sms:logs:read, content-messages:read, 2fa:pin:send, viber-bot:message:send, answers:manage, people:use, calls:logs:read, voice:logs:read, calls:bulk:manage, rcs:message:send, google-bm:manage, rcs:manage, messages-api:manage, calls:read, callrouting:manage, voice-message:manage, zalo-follower:message:send, forms:use, number-lookup:logs:read, mobile-app-messaging:inbound-message:read, whatsapp:conversions, messages-api:message:send, webrtc:configuration:manage, apple-mfb:message:send, voice:recording:delete, numbers:manage, conversations:manage, sending-strategy:manage, email:message:send, number-lookup:manage, calls:manage, webrtc:identity:manage, resource-request-hub:manage, rbm-maap:message:send, catalogs:use, whatsapp:inbound-message:read, voice-message:logs:read, calllink:link:manage, email:manage, number-activation-state:read, 2fa:pin:manage, calls:recording:delete, whatsapp:manage, whatsapp:message:send, mms:inbound-message:read, calls:media:manage, 2fa:manage, voice:recording:read, calls:traffic:record, ivr:manage, 2fa:sdk, clicktocall:manage, mobile-app-messaging:manage, flow:read, ivr:configuration:manage, mobile-identity:manage, metrics:manage, flow:use, catalogs:read, number-lookup:send, mobile-app-messaging:send, instagram:manage, signals:manage, apple-mfb:logs:read, google-bm:logs:read, instagram:message:send, messenger:message:send, web-push:send, mobile-app-messaging:logs:read, mms:manage, blocklist:manage, omni-failover:logs:read, viber-bot:manage, account-management:manage, forms:manage, answers:testing, rcs:logs:read, line:manage, email:templates:manage, calls:configuration:manage, web-push:manage, campaign-tags:view, web:sdk, catalogs:manage, viber-bm:manage, application-entity:manage, google-bm:message:send, ivr:message:send, voice-reports:read, numbermasking:manage
Integrations Managerzalo-follower:logs:read, inbound-message:read, kakao:logs:read, zalo-follower:manage, kakao:message:send, people:manage, kakao:manage, zalo:manage, messenger:logs:read, whatsapp:logs:read, people:read, sms:message:send, webrtc:media:manage, mms:message:send, audit-logs:read, content-messages:manage, webrtc:manage, numbers:recording:manage, voice:recording:manage, viber-bm:logs:read, omni-failover:manage, viber-bot:logs:read, mms:logs:read, apple-mfb:manage, messenger:manage, email:logs:read, instagram:logs:read, resource-request-hub:read, calls:recording:read, line:message:send, omni-failover:message:send, sms:inbound-message:read, campaign-tags:manage, calllink:configuration:manage, calls:traffic:receive, message:send, live-chat:manage, subscriptions:manage, rbm-maap:manage, forms:read, biometrics:manage, sms:manage, zalo:logs:read, calllink:manage, voice-message:message:send, error-codes:read, zalo:message:send, calls:traffic:send, flow:manage, viber-bm:message:send, sms:logs:read, content-messages:read, 2fa:pin:send, viber-bot:message:send, answers:manage, people:use, calls:logs:read, voice:logs:read, calls:bulk:manage, rcs:message:send, google-bm:manage, rcs:manage, messages-api:manage, calls:read, callrouting:manage, voice-message:manage, zalo-follower:message:send, forms:use, number-lookup:logs:read, mobile-app-messaging:inbound-message:read, whatsapp:conversions, messages-api:message:send, webrtc:configuration:manage, apple-mfb:message:send, voice:recording:delete, numbers:manage, conversations:manage, sending-strategy:manage, email:message:send, number-lookup:manage, calls:manage, webrtc:identity:manage, resource-request-hub:manage, rbm-maap:message:send, catalogs:use, whatsapp:inbound-message:read, voice-message:logs:read, calllink:link:manage, email:manage, number-activation-state:read, 2fa:pin:manage, calls:recording:delete, whatsapp:manage, whatsapp:message:send, mms:inbound-message:read, calls:media:manage, 2fa:manage, voice:recording:read, calls:traffic:record, ivr:manage, 2fa:sdk, clicktocall:manage, mobile-app-messaging:manage, flow:read, ivr:configuration:manage, mobile-identity:manage, metrics:manage, flow:use, catalogs:read, number-lookup:send, mobile-app-messaging:send, instagram:manage, signals:manage, apple-mfb:logs:read, google-bm:logs:read, instagram:message:send, messenger:message:send, web-push:send, mobile-app-messaging:logs:read, mms:manage, blocklist:manage, omni-failover:logs:read, viber-bot:manage, account-management:manage, forms:manage, answers:testing, rcs:logs:read, line:manage, email:templates:manage, calls:configuration:manage, web-push:manage, campaign-tags:view, web:sdk, catalogs:manage, viber-bm:manage, application-entity:manage, google-bm:message:send, ivr:message:send, voice-reports:read, numbermasking:manage
Conversations Agentforms:manage, calls:manage, content-messages:read, conversations:manage
Conversations Managerforms:manage, content-messages:manage, catalogs:manage, calls:manage, content-messages:read, conversations:manage
Conversations Analyze Managerconversations:manage
Conversations Account Managerconversations:manage, account-management:manage
Answers Managervoice-message:logs:read, rcs:logs:read, kakao:logs:read, sms:logs:read, number-lookup:logs:read, answers:manage, live-chat:manage, apple-mfb:logs:read, calls:logs:read, voice:logs:read, viber-bm:logs:read, catalogs:manage, google-bm:logs:read, messenger:logs:read, viber-bot:logs:read, mms:logs:read, whatsapp:logs:read, email:logs:read, instagram:logs:read, omni-failover:logs:read, zalo:logs:read
Answers Designerapple-mfb:logs:read, viber-bm:logs:read, calls:logs:read, voice-message:logs:read, voice:logs:read, catalogs:manage, google-bm:logs:read, messenger:logs:read, viber-bot:logs:read, mms:logs:read, rcs:logs:read, kakao:logs:read, whatsapp:logs:read, email:logs:read, instagram:logs:read, omni-failover:logs:read, zalo:logs:read, sms:logs:read, number-lookup:logs:read, answers:manage
Answers Supervisoranswers:manage
Knowledge Base Managerconversations:manage
Knowledge Base Userconversations:manage
Campaign Content Creatorapple-mfb:logs:read, viber-bm:logs:read, calls:logs:read, voice-message:logs:read, voice:logs:read, google-bm:logs:read, messenger:logs:read, viber-bot:logs:read, mms:logs:read, rcs:logs:read, kakao:logs:read, whatsapp:logs:read, email:logs:read, instagram:logs:read, omni-failover:logs:read, zalo:logs:read, sms:logs:read, number-lookup:logs:read
Campaign Approval Managerapple-mfb:logs:read, viber-bm:logs:read, calls:logs:read, voice-message:logs:read, voice:logs:read, google-bm:logs:read, messenger:logs:read, viber-bot:logs:read, mms:logs:read, rcs:logs:read, kakao:logs:read, whatsapp:logs:read, email:logs:read, instagram:logs:read, omni-failover:logs:read, zalo:logs:read, sms:logs:read, number-lookup:logs:read
Content Managercontent-messages:manage, campaign-tags:view, content-messages:read, conversations:manage

Errors

You will receive the 403 Forbidden HTTP status code in the response in case provided user or API key is lacking the required scopes:

json
 
    {
        "requestError": {
            "serviceException": {
            "messageId": "FORBIDDEN",
            "text": "Forbidden"
            }
        }
    }
 

Library exceptions

When using one of the libraries (opens in a new tab), make sure to handle API exceptions.

REQUEST SAMPLES
 
    try {
        SmsResponse smsResponse = sendSmsApi.sendSmsMessage(smsMessageRequest);
    } catch (ApiException apiException) {
        apiException.getCode();
        apiException.getResponseHeaders();
        apiException.getResponseBody();
    }
 

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products