Skip to content

Credentials

MEGOGO gives you a set of IDs and keys before the integration starts. This page tells what each value is for and how to keep it safe.

What MEGOGO gives you

Value Example Used in Purpose
Partner ID {partner_id} Billing API (path), /auth/by_partners (partner_key) Identifies your company
Public key {public_key} Content API (sign) Identifies the key pair. It is the end of each signature
Private key {private_key} Content API (sign) Makes the signature. Never send it in a request
Salt {salt} Authorization token Makes the authorization token of a user
Service IDs {service_id} Billing API (serviceId) Identify the subscriptions and the purchases that you sell
Test partner ID and test keys testprod_ua All requests Tests on the production servers

MEGOGO makes all these values. You cannot change them.

Keys for each platform

MEGOGO gives a separate key pair (public key and private key) for each platform:

  • web
  • mobile devices
  • Smart TV
  • set-top boxes (STB)

The content that is available can be different for each key. Use the key of the platform where the user watches the video.

MEGOGO also sets the stream settings of each key:

Setting Options
Streaming protocol for videos without DRM HLS, DASH or MSS
DRM system and protocol for videos with DRM Widevine (DASH), PlayReady (DASH or MSS), FairPlay (HLS)
4K (UHD) videos A separate setting with H.265: HLS or DASH without DRM, Widevine (DASH), PlayReady (DASH), FairPlay (HLS). If this setting is empty, the key does not play 4K videos

Tell your MEGOGO manager which protocols and DRM systems your player supports on each platform. The /stream response tells the protocol in stream_type: hls, dash or mss.

Service IDs

  • Subscriptions (SVOD): MEGOGO gives text IDs, for example premiumsvod. Usually a subscription period is 30 days. MEGOGO can give separate service IDs for trial access, for example for 7 or 14 days.
  • Single purchases (TVOD, DTO): the service ID is a number. It is the tariff_id that the Content API returns for the video in purchase_info. Do not use the IDs and the prices from the XML feed.

Test partner ID

MEGOGO does not have a separate test environment. Your test partner ID (for example testprod_ua or testprod_az) and your test keys work on the production servers. Use them for all tests.

IP addresses for the Billing API

The Billing API accepts requests only from the IP addresses of your servers.

  1. Give the list of your IP addresses to your MEGOGO manager.
  2. To change the list, send an e-mail to supportpartners@megogo.net. Write your partner ID in the e-mail.

A request from an IP address that is not in the list gets HTTP 401 with a text message. The message is not JSON.

Keep the credentials safe

WARNING

Keep the salt only on your server. Do not put it in a client application. With the salt and a private key, a person can authorize as any of your users.

WARNING

Keep the private keys on your server. If your client application sends requests to the Content API, get the signed URL from your server. Then the client sends the request, and MEGOGO finds the location of the user from the client IP address.

WARNING

Do not put the credentials in a repository, a log or an error message. If an unauthorized person gets a credential, tell your MEGOGO manager immediately.

Limits

Each key can send 1000 requests per minute to the Content API. The same limit applies to the Billing API. Above the limit, MEGOGO can return HTTP 429 Too Many Requests. To increase the limit, ask your MEGOGO manager.

Next steps