API reference/Core Maps, Search & Routing
POSTstatelesslegacy-source evidence

Token Generation API

/security/oauth/token

This API is required to generate tokens authorize the oAuth 2 based APIs. Hence, the developer would need to send a request for access token using their clientid and clientsecret to the Token Generation API. Once validated from the OAuth API, the accesstoken and the tokentype need to be sent as Authorization header with the value: {tokentype} {accesstoken} Authorization: “tokentype accesstoken”.

Legacy contract evidence

This operation was normalized from a MapmyIndia-generation specification. Validate its current Mappls host, path, package entitlement, authentication generation, and commercial availability before production use.

Call the operation

POSThttps://outpost.mapmyindia.com/api/security/oauth/token
Base URLhttps://outpost.mapmyindia.com/api
Authenticationoauth2 bearer
Journey rolerequest response
Content typesapplication/x-www-form-urlencoded

Parameters

NameLocationTypeDescriptionExample
No explicit parameters are declared by the source operation.

Body schema

FieldTypeDescriptionExample
grant_typerequired
string

The grant type applicable to the token. By default, it is set at "clientcredentials".

client_credentials
client_idrequired
string

The client ID provided to thec client for accessing oAuth 2 based APIs.

YOUR_CLIENT_ID
client_secretrequired
string

The client secret provided to thec client for accessing oAuth 2 based APIs.

YOUR_CLIENT_SECRET
Request body example
{
  "grant_type": "client_credentials",
  "client_id": "this-is-client-id-provided-to-client",
  "client_secret": "this-is-client-secret-provided-to-client"
}

Build your request in eight languages

Change source-backed examples once, validate required inputs, and copy the synchronized cURL, JavaScript, Python, Java, C#, Go, PHP, or Ruby request. Credentials remain environment references, and this page never sends a provider request.

Local request composerCode stays local · fixtures are explicit
POSTRequest inputs
0 editable · 0 protected
This operation has no editable path or query parameters.
Generated in eight languages
Environment-backed credentials
POSThttps://outpost.mapmyindia.com/api/security/oauth/token
Credential-free sandboxExecute this contract without a provider call
How fixtures work
Generated from your inputs
curl --request POST \
  --url 'https://outpost.mapmyindia.com/api/security/oauth/token' \
  --header "Accept: application/json" \
  --header "Authorization: Bearer ${MAPPLS_ACCESS_TOKEN}" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-raw '{"grant_type":"client_credentials","client_id":"this-is-client-id-provided-to-client","client_secret":"this-is-client-secret-provided-to-client"}'

Credential-safe by constructionSet MAPPLS_ACCESS_TOKEN only in your trusted runtime. Code generation stays local. Sandbox execution sends only bounded fixture inputs to this developer platform and never reads a credential or calls Mappls.

Send a production-shaped request

Examples use environment-backed access tokens, explicit timeouts where supported, status checks, and JSON bodies derived from the source schema. Replace sample identifiers and coordinates with values from your application.

POST /security/oauth/token
curl --request POST \
  --url 'https://outpost.mapmyindia.com/api/security/oauth/token' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "grant_type": "client_credentials",
  "client_id": "this-is-client-id-provided-to-client",
  "client_secret": "this-is-client-secret-provided-to-client"
}'

Responses

200

OK

400

Bad request; User made an error while creating a valid request.

401

Unauthorized, if the clientID doesn’t exist or an invalid clientSecret is provided.

403

Forbidden.

500

Something went wrong.

503

Maintenance break.

200 response fields

FieldTypeDescriptionExample
access_tokenrequired
string

No field description in the source contract.

YOUR_ACCESS_TOKEN
token_typerequired
string

No field description in the source contract.

YOUR_ACCESS_TOKEN
expires_inrequired
integer

No field description in the source contract.

86499
scoperequired
string

No field description in the source contract.

READ
project_coderequired
string

No field description in the source contract.

prj1234567890987654321
client_idrequired
string

No field description in the source contract.

YOUR_CLIENT_ID
Response example
{
  "access_token": "0XXXXXXf-dXX0-4XX0-8XXa-eXXXXXXXXXX6",
  "token_type": "bearer",
  "expires_in": 86499,
  "scope": "READ",
  "project_code": "prj1234567890987654321",
  "client_id": "thisistheplace-whereyour-clientIdisprovidedback"
}

Operate it safely

request-response

This operation is evaluated independently from the request. Cache and retry according to its documented semantics.

Keep credentials and raw tokens out of source, client bundles, prompts, and logs.Record the operation ID, status, latency, retry count, and source contract version in traces.Classify 4xx responses before retrying; back off and add jitter for retryable 5xx or transport failures.Cache only when request inputs, authorization scope, and freshness requirements permit it.

Contract provenance

Source file
contenthub/dochub/mapmyindia-rest-api/docs/custom/tokenGeneration.yml
SHA-256
9db8784388d7bdb71cf6b3d3fedc21c9e97d85fbd0cee24e236d9c273daf7b13
Normalization
Fields are parsed from OpenAPI. Operational guidance and language samples are generated and labeled separately.