Skip to content

Authentication

Generate Bearer Token

Before using the Vibe Mobi API, you need to authenticate and obtain a Bearer token. This token must be included in all subsequent API requests.

Endpoint

POST /v1/login/access-token

Request Body

Parameter Type Required Description
username string Yes The username for authentication
password string Yes The password for authentication

Example Request

curl -X POST https://api.mw.vibemobi.com/v1/login/access-token \
  -H "Content-Type: application/json" \
  -d '{
    "username": "your_username",
    "password": "your_password"
  }'

Response Examples

Successful Response

A successful authentication will return a JSON object containing the access token and token type:

{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cXVCJ9.eyJleHAiOjE3NDM2MzkwMTQsInN1YiI6IjdhOGM20hUvlViCXgL-RN2qr9EgkuWKHLlmpvX7UEMQ2wA",
    "token_type": "bearer"
}

Invalid Credentials

If the provided credentials are incorrect, you will receive an error response:

{
    "detail": "Incorrect email or password"
}

Using the Token

Once you have obtained the access token, you must include it in the Authorization header of all subsequent API requests:

Authorization: Bearer <access_token>

Example

curl -X POST https://api.mw.vibemobi.com/v1/sim/activate/ \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cXVCJ9.eyJleHAiOjE3NDM2MzkwMTQsInN1YiI6IjdhOGM20hUvlViCXgL-RN2qr9EgkuWKHLlmpvX7UEMQ2wA" \
  -H "Content-Type: application/json" \
  -d '{
    "sim": "8901234567891234567",
    "plan_id": 1234,
    "service_zip": "10001",
    "agent_id": "AGENT001",
    "transaction_id": "TRANS123456789",
    "action": "new_number_activation_with_zip_code"
  }'

Token Expiration

The access token has a limited validity period. If your token expires, you will receive a 401 Unauthorized response. In this case, you need to generate a new token by authenticating again.

Security Note

Keep your access token secure and do not share it. The token provides access to perform operations on behalf of your account.